Hi Streamlit Community!
I’m building a YouTube video downloader app using yt-dlp
. It works perfectly locally (via streamlit run
), but when I deploy it to Streamlit Community Cloud, I get this error:
ModuleNotFoundError: This app has encountered an error.
File "/mount/src/yt-video-downloader/youtube-downloader-app.py", line 3, in <module>
import yt_dlp
What I’ve Tried:
- Confirmed the correct import: My code uses
import yt_dlp
(underscore). - Added
yt-dlp
torequirements.txt
:yt-dlp>=2023.11.16 streamlit pandas
- Verified
packages.txt
forffmpeg
:ffmpeg
- Tested locally: Works flawlessly with
pip install -r requirements.txt
.
The Problem:
- Streamlit Cloud seems unable to install
yt-dlp
despite it being inrequirements.txt
. - No clear logs (error message is redacted).
Questions:
- Is
yt-dlp
supported on Streamlit Cloud? - Are there additional dependencies needed (e.g.,
ffmpeg
)? - Could this be a platform restriction (e.g., blocked by YouTube’s ToS)?
Thanks for your help!