Pytube Issue / bug : https://github.com/pytube/pytube/issues/1199#issuecomment-1017372476

Dear Streamlit team,

There is recent bug with pytube library and I have an app running on Streamlit Cloud using pytube.
To solve the problem locally I changed the line 30 in pytube/cipher.py :
from var_regex = re.compile(r"^\w+\W")
to
var_regex = re.compile(r"^\$*\w+\W")

But you would probably need to fix this on your side so that apps - deployed on Streamlit Cloud - using pytube can run properly.

The issue was open on Github 19 hours ago → [BUG] RegexMatchError ? · Issue #1199 · pytube/pytube · GitHub

Thank you, Reda Merzouki (from Paris France).

Hi @rmerzouki, welcome to the Streamlit community!

This isn’t something we can “fix on our side”. It looks like pytube is in the process of pushing out a new version of the package; when that happens, you can update your Streamlit app dependencies to have that new version and upon making that commit in your repo, the app will re-build.

Best,
Randy

1 Like

Hi Randy, Thank you so much for your quick reply. I found a workaround, [BUG] RegexMatchError ? · Issue #1199 · pytube/pytube · GitHub, I actually I forked this Github repository, changed the requirements.txt file accordingly, git pushed the changes and it worked perfectly :blush:
Thank you,
Kind Regards, Reda

1 Like

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