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.