Trouble d/ling from YouTube. Getting an error (I believe) related to Python. #1650

Closed
opened 2026-02-21 00:02:34 -05:00 by deekerman · 5 comments
Owner

Originally created by @Starfoxian on GitHub (Jan 8, 2014).

Hi. I've lurked on this forum since I first started with youtube-dl and I think I'm posting in the right place. I updated my youtube-dl today and when I tried to download I get this:

youtube-dl -f 18 http://www.youtube.com/watch?v=oJnz63iJlDo
[youtube] Setting language
[youtube] oJnz63iJlDo: Downloading webpage
[youtube] oJnz63iJlDo: Downloading video info webpage
[youtube] Confirming age
[youtube] oJnz63iJlDo: Extracting video information
[youtube] RTMP download detected
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/main.py", line 18, in
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 761, in main
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 751, in _real_main
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 952, in download
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 493, in extract_info
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 155, in extract
File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1336, in _real_extract
KeyError: None

I picked a video at random to see if I could download at all and it did download but the output in terminal was odd to say the least.

youtube-dl -f 18 http://www.youtube.com/watch?v=ab9176Srb5Y
[youtube] Setting language
[youtube] ab9176Srb5Y: Downloading webpage
[youtube] ab9176Srb5Y: Downloading video info webpage
[youtube] ab9176Srb5Y: Extracting video information
[youtube] ab9176Srb5Y: Encrypted signatures detected.
[youtube] ab9176Srb5Y: Downloading js player vflwMrwdI
WARNING: Writing cache to u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_82.json' failed: Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 345, in _extract_signature_function
write_json_file(cache_spec, cache_fn)
File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 216, in write_json_file
with open(fn, 'wb') as f:
IOError: [Errno 13] Permission denied: u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_82.json'

[youtube] ab9176Srb5Y: Downloading js player vflwMrwdI
WARNING: Writing cache to u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_85.json' failed: Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 345, in _extract_signature_function
write_json_file(cache_spec, cache_fn)
File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 216, in write_json_file
with open(fn, 'wb') as f:
IOError: [Errno 13] Permission denied: u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_85.json'

[download] Destination: Eminem - Berzerk (Official) (Explicit)-ab9176Srb5Y.mp4
[download] 100% of 22.54MiB in 00:06

I am unsure if this is the place to ask for help or to merely report issues so they can be addressed. If this is not the place to seek help, would it be too much to ask for a link to a forum where I could receive assistance?

Originally created by @Starfoxian on GitHub (Jan 8, 2014). Hi. I've lurked on this forum since I first started with youtube-dl and I think I'm posting in the right place. I updated my youtube-dl today and when I tried to download I get this: youtube-dl -f 18 http://www.youtube.com/watch?v=oJnz63iJlDo [youtube] Setting language [youtube] oJnz63iJlDo: Downloading webpage [youtube] oJnz63iJlDo: Downloading video info webpage [youtube] Confirming age [youtube] oJnz63iJlDo: Extracting video information [youtube] RTMP download detected Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/bin/youtube-dl/__main__.py", line 18, in <module> File "/usr/bin/youtube-dl/youtube_dl/**init**.py", line 761, in main File "/usr/bin/youtube-dl/youtube_dl/**init**.py", line 751, in _real_main File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 952, in download File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 493, in extract_info File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 155, in extract File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1336, in _real_extract KeyError: None I picked a video at random to see if I could download at all and it did download but the output in terminal was odd to say the least. youtube-dl -f 18 http://www.youtube.com/watch?v=ab9176Srb5Y [youtube] Setting language [youtube] ab9176Srb5Y: Downloading webpage [youtube] ab9176Srb5Y: Downloading video info webpage [youtube] ab9176Srb5Y: Extracting video information [youtube] ab9176Srb5Y: Encrypted signatures detected. [youtube] ab9176Srb5Y: Downloading js player vflwMrwdI WARNING: Writing cache to u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_82.json' failed: Traceback (most recent call last): File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 345, in _extract_signature_function write_json_file(cache_spec, cache_fn) File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 216, in write_json_file with open(fn, 'wb') as f: IOError: [Errno 13] Permission denied: u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_82.json' [youtube] ab9176Srb5Y: Downloading js player vflwMrwdI WARNING: Writing cache to u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_85.json' failed: Traceback (most recent call last): File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 345, in _extract_signature_function write_json_file(cache_spec, cache_fn) File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 216, in write_json_file with open(fn, 'wb') as f: IOError: [Errno 13] Permission denied: u'/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_85.json' [download] Destination: Eminem - Berzerk (Official) (Explicit)-ab9176Srb5Y.mp4 [download] 100% of 22.54MiB in 00:06 I am unsure if this is the place to ask for help or to merely report issues so they can be addressed. If this is not the place to seek help, would it be too much to ask for a link to a forum where I could receive assistance?
Author
Owner

@phihag commented on GitHub (Jan 8, 2014):

You are in the right place, this bugtracker deals with any issues with youtube-dl. Mind that it is not a forum, but more structured (if you follow the hints for bug reporting, you should be fine ). Both errors are completely unrelated.

The second error is actually non-fatal, the download works just fine. However, it's strange that you can't write to your own home directory. What are the permissions of, say, /home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_85.json, and the intermediate directories?

The first video uses Youtube's feature film infrastructure, for which we don't have good support yet. I've fixed the immediate error, but it looks like we need to extract more information before that download can succeed.

@phihag commented on GitHub (Jan 8, 2014): You are in the right place, this bugtracker deals with any issues with youtube-dl. Mind that it is not a forum, but more structured (if you follow [the hints for bug reporting](https://github.com/rg3/youtube-dl/#bugs), you should be fine ). Both errors are completely unrelated. The second error is actually non-fatal, the download works just fine. However, it's strange that you can't write to your own home directory. What are the permissions of, say, `/home/ysuran/.cache/youtube-dl/youtube-sigfuncs/js_vflwMrwdI_85.json`, and the intermediate directories? The [first video](http://www.youtube.com/watch?v=oJnz63iJlDo) uses Youtube's feature film infrastructure, for which we don't have good support yet. I've fixed the immediate error, but it looks like we need to extract more information before that download can succeed.
Author
Owner

@Starfoxian commented on GitHub (Jan 8, 2014):

The owner is root.

The output for: ls -l /home/ysuran/.cache/youtube-dl/youtube-sigfuncs/ is:
total 8
-rw-r--r-- 1 root root 290 Jan 5 23:55 js_vflG49soT_82.json
-rw-r--r-- 1 root root 314 Jan 5 23:55 js_vflG49soT_88.json

When I ran Ubuntu I used sudo before youtube-dl. I am running Mint now and using sudo gives me a locked file that is only accessible via root. I was unable to change permissions on the file using Nautilus so I tried it without sudo first and it worked up until today. Yesterday as a matter of fact.

I will read the link you posted regarding adding a pseudo format. I will also Google more on permissions. I will read the hints for bug reporting too as it has been a rather long while since I read them last and I may have done this wrong. The first video was from a series which is quite old and was uploaded some time ago so that may factor in. Thanks again. I am trying to include the appropriate information and such.

@Starfoxian commented on GitHub (Jan 8, 2014): The owner is root. The output for: ls -l /home/ysuran/.cache/youtube-dl/youtube-sigfuncs/ is: total 8 -rw-r--r-- 1 root root 290 Jan 5 23:55 js_vflG49soT_82.json -rw-r--r-- 1 root root 314 Jan 5 23:55 js_vflG49soT_88.json When I ran Ubuntu I used sudo before youtube-dl. I am running Mint now and using sudo gives me a locked file that is only accessible via root. I was unable to change permissions on the file using Nautilus so I tried it without sudo first and it worked up until today. Yesterday as a matter of fact. I will read the link you posted regarding adding a pseudo format. I will also Google more on permissions. I will read the hints for bug reporting too as it has been a rather long while since I read them last and I may have done this wrong. The first video was from a series which is quite old and was uploaded some time ago so that may factor in. Thanks again. I am trying to include the appropriate information and such.
Author
Owner

@phihag commented on GitHub (Jan 8, 2014):

The only time you should ever run youtube-dl as root is when updating a system-wide binary. You can simply run sudo rm -rf /home/ysuran/.cache/youtube-dl once and everything should get working again. But as I wrote above, the permission messages are a harmless nuisance.

youtube-dl needs to be extended to extract the correct RTMP parameters for feature-films URLs. The pseudo format is just preventing the immediate programming error; downloading will still not work even after applying the change.

@phihag commented on GitHub (Jan 8, 2014): The only time you should ever run youtube-dl as root is when updating a system-wide binary. You can simply run `sudo rm -rf /home/ysuran/.cache/youtube-dl` once and everything should get working again. But as I wrote above, the permission messages are a harmless nuisance. youtube-dl needs to be extended to extract the correct RTMP parameters for feature-films URLs. The pseudo format is just preventing the immediate programming error; downloading will still not work even after applying the change.
Author
Owner

@Starfoxian commented on GitHub (Jan 8, 2014):

I won't run it again using root. After changing to Mint I made more of an effort to learn what was behind different commands. My Ubuntu distro was quite old and I rarely used youtube-dl. Still, I am learning.

Thank you for letting me know a bit more about the pseudo format. I was using Google to attempt to decipher what it said more. Oh well, its good to know. Thanks again. I did use the command you shared to fix the error though.

@Starfoxian commented on GitHub (Jan 8, 2014): I won't run it again using root. After changing to Mint I made more of an effort to learn what was behind different commands. My Ubuntu distro was quite old and I rarely used youtube-dl. Still, I am learning. Thank you for letting me know a bit more about the pseudo format. I was using Google to attempt to decipher what it said more. Oh well, its good to know. Thanks again. I did use the command you shared to fix the error though.
Author
Owner

@dstftw commented on GitHub (Jun 13, 2016):

Duplicate of #343.

@dstftw commented on GitHub (Jun 13, 2016): Duplicate of #343.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#1650
No description provided.