«File name too long» should not error
See original GitHub issueChecklist
- I’m reporting a feature request
- I’ve verified that I’m running youtube-dl version 2021.06.06
- I’ve searched the bugtracker for similar feature requests including closed ones
Description
To reproduce:
- try to download any video with a really long title
- you get
ERROR: unable to open for writing: [Errno 36] File name too long:
- the video is not downloaded
My suggestion:
- instead of an
ERROR
put aWARNING
- download the video regardless, just truncate the title to an appropriate size, similar to what suggested in #29627
This will improve UX, check bug tracker to see how common this issue is.
#7765 talks about this too (with a linked pull request) but:
- does not elaborate on whether it is actually a good thing / possible drawbacks
- is limited to collaborators
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
How To Fix 'Filename Is Too Long' Issue In Windows
It's obvious who the offender is in this case. Find the file in Windows Explorer, or File Explorer as it's called in Windows...
Read more >SOLVED: The File Name Is Too Long
This error represents that the file name is either too long to open, delete, or edit considering the given file location or path...
Read more >Fix Error 0x800700CE, The filename or extension is too long
It's very easy to fix the File name or extension is too long problem. You can try these solutions in the situation: run...
Read more >Destination Path Too Long Error When Moving/Copying a File
The simplest way is to shorten the name of the parent folders, by reducing the total path length by simply renaming it. This...
Read more >[SOLVED] How to Fix The File Name Too Long Error Problem
Since the File Name Too Long for destination folder windows 10 error is all about longer filename, so the first thing you need...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
--trim-filenames
is a poorly implemented solution from youtube-dlc and I would not recommend porting it as-is. Even in yt-dlp, I recommend users to use the % formatting to control filename length instead. E.g. https://github.com/yt-dlp/yt-dlp/issues/3494This is actually a bug and shows how poorly implemented the option is! See https://github.com/yt-dlp/yt-dlp/issues/2314. Do not rely on this behavior…
This is particularly annoying when downloading videos from Twitter as it takes the whole post as file name. I usually use --id and rename the file manually.