question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prefetch gets key error on "url_encoded_fmt_stream_map"

See original GitHub issue

Pytube was working just fine earlier and then, while I was downloading a few videos, it crashed somewhere among the middle, and it hasn’t functioned on a single video since, including videos I have successfully downloaded in the past. This applies both to python code, and the command line interface. It crashes on any “YouTube([link])”.

The error is the following (always the same):

C:\Users\Robly\talos>pytube v=0XpgchQnaUY --list
Traceback (most recent call last):
  File "c:\code\python3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\code\python3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Code\Python3\Scripts\pytube.exe\__main__.py", line 9, in <module>
  File "c:\code\python3\lib\site-packages\pytube\cli.py", line 58, in main
    display_streams(args.url)
  File "c:\code\python3\lib\site-packages\pytube\cli.py", line 182, in display_streams
    yt = YouTube(url)
  File "c:\code\python3\lib\site-packages\pytube\__main__.py", line 81, in __init__
    self.prefetch_init()
  File "c:\code\python3\lib\site-packages\pytube\__main__.py", line 90, in prefetch_init
    self.init()
  File "c:\code\python3\lib\site-packages\pytube\__main__.py", line 117, in init
    mixins.apply_descrambler(self.vid_info, fmt)
  File "c:\code\python3\lib\site-packages\pytube\mixins.py", line 76, in apply_descrambler
    for i in stream_data[key].split(',')
KeyError: 'url_encoded_fmt_stream_map'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

5reactions
J0K3RAScommented, Jan 9, 2018

Ok. So the problem is witth pytube 7.0.18. Installing the latest version 8.0.X solved the problem

2reactions
coconutattitudecommented, Dec 19, 2019

Still receiving this on pytube 9.5.3 File “/home/feelthebern/anaconda3/lib/python3.7/site-packages/pytube/mixins.py”, line 96, in apply_descrambler for i in stream_data[key].split(‘,’) KeyError: ‘url_encoded_fmt_stream_map’

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django, prefetch related raises key error - Stack Overflow
I have a query which executes a reverse prefetch related. But raises the following error: KeyError at /api/group/ (1,).
Read more >
I can not open prefetch - Microsoft Community
Method 1: Permission to the folder​​ Open File Explorer and go to c:/windows. Right-click on the Prefetch folder which you're unable to access ......
Read more >
Link prefetching FAQ - HTTP - MDN Web Docs
When the user visits one of the prefetched documents, it can be served up quickly out of the browser's cache. What are the...
Read more >
Viewing online file analysis results for 'base.js'
Get your own cloud service or the full version to view all details. ... Sets the process error mode to suppress error box....
Read more >
Prefetch Files in Windows - GeeksforGeeks
The log about the frequently running application on your machine is stored in the prefetch folder. The log is encrypted in Hash Format...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found