Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pytube failing
-
Pytube was working fine but I suddenly started getting the following when downloading:
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/youtube_dl.py", line 4, in <module>
YouTube(appex.get_url()).streams.first().download()
File "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages/pytube/main.py", line 81, in initFile "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages/pytube/main.py", line 90, in prefetch_init
"""
File "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages/pytube/main.py", line 117, in init
stream_maps.append('adaptive_fmts')
File "/private/var/mobile/Containers/Shared/AppGroup/B86CEE4E-E4A9-4BB4-9CA7-6E13BDA2C2A4/Pythonista3/Documents/site-packages/pytube/mixins.py", line 76, in apply_descrambler
for i in stream_data[key].split(',')
KeyError: 'url_encoded_fmt_stream_map'This version also works fine on a Mac. Can anyone see what might be causing this problem?
-
@ihf , sorry I am no help. But did you try running under 2.7 in Pythonista?
-
Google is your friend when you're lost. Second result leads to #188, then to comment 356410149 and then to pytube to 8.x releases.
- Launch StaSh
pip remove pytube
pip install pytube
- Kill & launch Pythonista
Should fix your issue.
-
That did it. Thanks!