Audio playing in a hosted app

Hello,
I am facing an issue when trying to play audio file from my repository
it works locally but when the app is hosted , it won’t work and i get this error message
streamlit.runtime.media_file_storage.MediaFileStorageError: This app has encountered an error.

Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/memory_media_file_storage.py", line 164, in _read_file
    with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'audio\\wav-audio\\Ascent\\Ascent_Theme.mp3.wav'

I’m not sure why it says FileNotFoundError , i have all the audio files in a directory called audio and it’s already backed up in my github and everything is synced .
Attached bellow is my project Github link
VinDazy/Valorant_Showcase (github.com)
Any help would be very appreciated , thank you

Probably because you are using windows file paths instead of linux file paths and streamlit cloud is a linux debian based environment.

That solved the problem,
great information thank you very much
One question though, please, Was this information provided in the streamlit audio documentation for file paths? because I have scrolled through the documentation tirelessly and I haven’t stumbled upon this information.
Again thank you for your time and effort

No, because this should be general Python and OS related knowledge :wink:

Understandable.
Thanks

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.