-1

How do I fix this -

yt = YouTube(url)
for i in stream_data[key].split(',')
KeyError: 'url_encoded_fmt_stream_map'

The 'key' is from the pytube module and so is everything else apart from the first line yt = YouTube(url)

This is a know problem with the module but I cannot find any solutions, only complaints. I need to know how to fix the issue on a Windows PC.

Dr_Claymore
  • 21
  • 1
  • 9
  • 3
    what is "key"? where is it coming from? Please post the full code required to reproduce this. – Azsgy Apr 14 '18 at 21:14

2 Answers2

0

Okay. I'm not sure why, but force reinstalling the module fixed it.

Dr_Claymore
  • 21
  • 1
  • 9
0

These Error is occurred due to mixins.py present in site-packages of pytube

You have to do this -

pip install pytube3

And then run the program again.

I had the same error and this worked for me as pytube had made some changes in their package.

David Buck
  • 3,752
  • 35
  • 31
  • 35