Heyyy Can anyone help me with my streamlit deployment I am having and error while deploying the app globally when I run locally it is working but when I try to deploy globally It as not working .In specific the pygame module is not working does anyone know its alternative to start and stop the music if so please help (I even wrote it in requirement.txt)
githublink: GitHub - Va-un/Perf
this is a psuedo code might contain a small but please help me solve this pygame module not found error
Hey @varun_chindage,
It looks like your requirements file is named requirement.txt – Community Cloud won’t recognize it unless it’s named requirements.txt
I don’t understand what you mean by “reinitialize”. If nothing else works, delete your application and deploy it again.
That should fix the ModuleNotFound error, but you will be greeted with another one when calling mixer.init():
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script
exec(code, module.__dict__)
File "/mount/src/perf/Main.py", line 15, in <module>
mixer.init()
pygame.error: dsp: No such audio device
Because indeed there are no audio devices in streamlit cloud.
You need a custom component to access the client computer trough the browser. I thing there is a component people are using for audio and video. I don’t remember the name but you should find it if you search the forum for related terms like pygame or pyaudio.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.