Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: unable to open for writing: [Errno 36] File name too long xxx #6882

Closed
10 tasks done
liuyang77886 opened this issue Apr 21, 2023 · 2 comments
Closed
10 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@liuyang77886
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2023.03.04 (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 known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

再ubuntu20下执行报错,再win10下正常运行

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

m111@m11:~/yt$ ./yt-dlp_linux -vU  https://www.youtube.com/watch?v=Stdj6U568S0 -f 140
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=Stdj6U568S0', '-f', '140']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (linux_dir)
[debug] Python 3.10.9 (CPython x86_64 64bit) - Linux-5.15.0-1036-azure-x86_64-with-glibc2.31 (OpenSSL 3.0.8 7 Feb 2023, glibc 2.31)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
yt-dlp is up to date (stable@2023.03.04)
[youtube] Extracting URL: https://www.youtube.com/watch?v=Stdj6U568S0
[youtube] Stdj6U568S0: Downloading webpage
[youtube] Stdj6U568S0: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] Stdj6U568S0: Downloading 1 format(s): 140
[debug] Invoking dashsegments downloader on "https://rr5---sn-oguelner.googlevideo.com/videoplayback?expire=1682110950&ei=hqVCZNmkM5C32roPh4a12AE&ip=52.253.113.7&id=o-ALynSsCB5LkZWsqPkjTmkQTp5gsAqEvMd3lR8SjoC2gA&itag=140&source=youtube&requiressl=yes&mh=AF&mm=31%2C29&mn=sn-oguelner%2Csn-ogul7n7s&ms=au%2Crdu&mv=m&mvi=5&pl=19&initcwndbps=1801250&spc=99c5CeXWgli93NY26msYvi-k-TXugyQ&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=38957328&dur=2407.096&lmt=1663616722567598&mt=1682089055&fvip=2&keepalive=yes&fexp=24007246&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgJqAgOWGHOGYaljfKP4q8wbDC7Rbt_LrsYeWfD-0bEEsCIQD4h5xi9uaqwehb7ZG4YVtbegLcLSzuveRGZ6T8AweuVQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgJv8PRPmya8mcj5VAy3hdgEqeH8D1DWOCLoO7xfikPdQCIQDQvVujB0nosx_NALtOHbBjWQMpMnecun8wOx5rukBjXA%3D%3D"
[dashsegments] Total fragments: 4
[download] Destination: 自建VPS科学上网节点!一个视频就够了!6.88RMB⧸月无限流量看8K!域名注册、解析、托管Cloudflare、证书申请、套用CDN!保姆级VPN搭建教程!(关联翻墙⧸VPS推荐⧸节点搭建) [Stdj6U568S0].m4a
ERROR: unable to open for writing: [Errno 36] File name too long: '自建VPS科学上网节点!一个视频就够了!6.88RMB⧸月无限流量看8K!域名注册、解析、托管Cloudflare、证书申请、套用CDN!保姆级VPN搭建教程!(关联翻墙⧸VPS推荐⧸节点搭建) [Stdj6U568S0].m4a.part-Frag1.part'
Traceback (most recent call last):
  File "yt_dlp/utils.py", line 662, in sanitize_open
  File "yt_dlp/utils.py", line 2221, in __init__
OSError: [Errno 36] File name too long: '自建VPS科学上网节点!一个视频就够了!6.88RMB⧸月无限流量看8K!域名注册、解析、托管Cloudflare、证书申请、套用CDN!保姆级VPN搭建教程!(关联翻墙⧸VPS推荐⧸节点搭建) [Stdj6U568S0].m4a.part-Frag1.part'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp/downloader/http.py", line 272, in download
  File "yt_dlp/downloader/common.py", line 235, in wrapper
  File "yt_dlp/downloader/common.py", line 221, in error_callback
  File "yt_dlp/utils.py", line 6149, in report_retry
  File "yt_dlp/downloader/common.py", line 230, in wrapper
  File "yt_dlp/downloader/common.py", line 241, in sanitize_open
  File "yt_dlp/utils.py", line 664, in sanitize_open
OSError: [Errno 36] File name too long: '自建VPS科学上网节点!一个视频就够了!6.88RMB⧸月无限流量看8K!域名注册、解析、托管Cloudflare、证书申请、套用CDN!保姆级VPN搭建教程!(关联翻墙⧸VPS推荐⧸节点搭建) [Stdj6U568S0].m4a.part-Frag1.part'

ERROR: fragment 1 not found, unable to continue
  File "yt_dlp/__main__.py", line 17, in <module>
  File "yt_dlp/__init__.py", line 967, in main
  File "yt_dlp/__init__.py", line 957, in _real_main
  File "yt_dlp/YoutubeDL.py", line 3369, in download
  File "yt_dlp/YoutubeDL.py", line 3344, in wrapper
  File "yt_dlp/YoutubeDL.py", line 1507, in extract_info
  File "yt_dlp/YoutubeDL.py", line 1518, in wrapper
  File "yt_dlp/YoutubeDL.py", line 1615, in __extract_info
  File "yt_dlp/YoutubeDL.py", line 1674, in process_ie_result
  File "yt_dlp/YoutubeDL.py", line 2779, in process_video_result
  File "yt_dlp/YoutubeDL.py", line 3247, in process_info
  File "yt_dlp/YoutubeDL.py", line 2970, in dl
  File "yt_dlp/downloader/common.py", line 444, in download
  File "yt_dlp/downloader/dash.py", line 60, in real_download
  File "yt_dlp/downloader/fragment.py", line 382, in download_and_append_fragments_multiple
  File "yt_dlp/downloader/fragment.py", line 522, in download_and_append_fragments
  File "yt_dlp/downloader/fragment.py", line 486, in append_fragment
  File "yt_dlp/YoutubeDL.py", line 1015, in report_error
  File "yt_dlp/YoutubeDL.py", line 944, in trouble
@liuyang77886 liuyang77886 added bug Bug that is not site-specific triage Untriaged issue labels Apr 21, 2023
@bashonly
Copy link
Member

bashonly commented Apr 21, 2023

The problem is exactly as the error message says, "File name too long"

add -o "%(title).150B [%(id)s].%(ext)s" to your command

or decrease 150 if you still get the error, e.g. -o "%(title).100B [%(id)s].%(ext)s"

Closing as duplicate of #1136

@bashonly bashonly closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2023
@bashonly bashonly added duplicate This issue or pull request already exists and removed bug Bug that is not site-specific triage Untriaged issue labels Apr 21, 2023
@kenorb
Copy link

kenorb commented Dec 13, 2023

Same for https://twitter.com/BrainStorm_Joe/status/1734386440706953260.

ERROR: unable to open for writing: [Errno 36] File name too long

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants