[Youtube] yt-dlp from scoop, unable to open for writing: [Errno 13] Permission denied

See original GitHub issue

Checklist

  • I’m reporting a broken site
  • I’ve verified that I’m running yt-dlp version 2022.06.29 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

Singapore

Provide a description that is worded well enough to be understood

When I use yt-dlp from scoop, I am unable to download some YouTube videos. But if I manually download yt-dlp.exe in a new path and run ./yt-dlp, this problem does not occur. I don’t know if it’s the yt-dlp.conf that causes the problem.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

> yt-dlp -vU -f 299+140 https://www.youtube.com/watch?v=LAVEKwkijLE
[debug] Command-line config: ['-vU', '-f', '299+140', 'https://www.youtube.com/watch?v=LAVEKwkijLE']
[debug] Portable config "D:\Scoop\apps\yt-dlp\current\yt-dlp.conf": []
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.29 [9d339c4] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.22621-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.0.1-full_build-www.gyan.dev (setts), ffprobe 5.0.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {'http': 'http://127.0.0.1:10809', 'https': 'https://127.0.0.1:10809', 'ftp': 'ftp://127.0.0.1:10809'}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp/releases/download/2022.06.29/_update_spec
Latest version: 2022.06.29, Current version: 2022.06.29
yt-dlp is up to date (2022.06.29)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=LAVEKwkijLE
[youtube] LAVEKwkijLE: Downloading webpage
[youtube] LAVEKwkijLE: Downloading android player API JSON
[debug] Loading youtube-nsig.0e7373c2 from cache
[debug] [youtube] Decrypted nsig fZcOi9i_C-Lae3Bju => CMaN4GAEhK9ZXA
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] LAVEKwkijLE: Downloading 1 format(s): 299+140
[debug] Invoking http downloader on "https://rr1---sn-npoeenly.googlevideo.com/videoplayback?expire=1657613370&ei=2tfMYseHKJWc4t4P5qKykAw&ip=149.129.44.144&id=o-APErmBa2ty0oxAtUIP7KvsU8S3bJDquiGXaqsUggdFe4&itag=299&source=youtube&requiressl=yes&mh=S9&mm=31%2C29&mn=sn-npoeenly%2Csn-npoe7nsl&ms=au%2Crdu&mv=m&mvi=1&pl=19&initcwndbps=980000&vprv=1&mime=video%2Fmp4&gir=yes&clen=984237091&dur=1403.985&lmt=1594890109044637&mt=1657591502&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgRniykcAxBC8-1A96B9Rfpi2sLGVXK795E4N_GUmEjmECIF450UgYd_Mx_5pwA-TCCKiO5z6LZdb6OOJhZdYCtUsf&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAOWmuHT0kUEn32fbsiQxXULDIWvInRvBldYtkNg7Ia3HAiB2iTBV_-EoPGgjz_uOWNo89mXbB9StQGfgPLvOeaadkA%3D%3D"
[download] Unable to open file due to file access error. Retrying (attempt 1 of 3) ...
[download] Unable to open file due to file access error. Retrying (attempt 2 of 3) ...
[download] Unable to open file due to file access error. Retrying (attempt 3 of 3) ...
ERROR: unable to open for writing: [Errno 13] Permission denied: 'Review - 2020 Honda Civic Si Coupe HPT [LAVEKwkijLE].f299.mp4.part'
Traceback (most recent call last):
  File "yt_dlp\utils.py", line 625, in sanitize_open
yt_dlp.utils.LockingUnsupportedError: File locking is not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\downloader\http.py", line 266, in download
  File "yt_dlp\downloader\common.py", line 224, in inner
  File "yt_dlp\downloader\common.py", line 242, in sanitize_open
  File "yt_dlp\utils.py", line 628, in sanitize_open
PermissionError: [Errno 13] Permission denied: 'Review - 2020 Honda Civic Si Coupe HPT [LAVEKwkijLE].f299.mp4.part'


[debug] Invoking http downloader on "https://rr1---sn-npoeenly.googlevideo.com/videoplayback?expire=1657613370&ei=2tfMYseHKJWc4t4P5qKykAw&ip=149.129.44.144&id=o-APErmBa2ty0oxAtUIP7KvsU8S3bJDquiGXaqsUggdFe4&itag=140&source=youtube&requiressl=yes&mh=S9&mm=31%2C29&mn=sn-npoeenly%2Csn-npoe7nsl&ms=au%2Crdu&mv=m&mvi=1&pl=19&initcwndbps=980000&vprv=1&mime=audio%2Fmp4&gir=yes&clen=22723964&dur=1404.040&lmt=1594889230931004&mt=1657591502&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgDznj56yirTCi8UIgu6kwypmzFQCv2w7RD0ksWuxipB0CIQCPiWLo_-qTmZyNTx4rf1SEn1MgH_MuBB9r8OdEDipcIw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAOWmuHT0kUEn32fbsiQxXULDIWvInRvBldYtkNg7Ia3HAiB2iTBV_-EoPGgjz_uOWNo89mXbB9StQGfgPLvOeaadkA%3D%3D"
[download] Unable to open file due to file access error. Retrying (attempt 1 of 3) ...
[download] Unable to open file due to file access error. Retrying (attempt 2 of 3) ...
[download] Unable to open file due to file access error. Retrying (attempt 3 of 3) ...
ERROR: unable to open for writing: [Errno 13] Permission denied: 'Review - 2020 Honda Civic Si Coupe HPT [LAVEKwkijLE].f140.m4a.part'
Traceback (most recent call last):
  File "yt_dlp\utils.py", line 625, in sanitize_open
yt_dlp.utils.LockingUnsupportedError: File locking is not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\downloader\http.py", line 266, in download
  File "yt_dlp\downloader\common.py", line 224, in inner
  File "yt_dlp\downloader\common.py", line 242, in sanitize_open
  File "yt_dlp\utils.py", line 628, in sanitize_open
PermissionError: [Errno 13] Permission denied: 'Review - 2020 Honda Civic Si Coupe HPT [LAVEKwkijLE].f140.m4a.part'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Jul 12, 2022

I wasn’t asking about your yt-dlp folder, but the console’s current directory - ie, the location where the video will be downloaded to

0reactions
b4imetucommented, Jul 12, 2022

@pukkandan Sorry about bothering you, I thought yt-dlp would download by default in the folder where yt-dlp.exe is located, but it turns out it’s a current directory (cd) problem. I’m so stupid! ^^ Thank you ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Linux Ubuntu] "unable to open for writing: [Errno 13 ... - Reddit
The command is sudo youtube-dl , so I should have access. ... [Linux Ubuntu] "unable to open for writing: [Errno 13] Permission denied" ......
Read more >
How to fix youtube-dl error : unable to open for writing
The -o option tells youtube-dl how to format the target path and name of your videos (not only the directory). Kind of counter-intuitive....
Read more >
How do you change the download directory for youtube-dl
An error occurs "Command raised an exception: DownloadError: ERROR: unable to open for writing: [Errno 13] Permission denied: 'National Anthem ...
Read more >
Integrating Youtube downloader into Vivaldi (tutorial)
YT-dlp is command line utility that downloads video from Youtube. ... ERROR: unable to open for writing: [Errno 13] Permission denied: ...
Read more >
[HOWTO] Fix yt-dlp error "file name too long" - Porteus Forum
First let s look at the error occurring guest@porteus: myvideo ... ERROR: unable to open for writing: [Errno 36] File name too long:...
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