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

Long Tweets: ERROR: Cannot write description file #23137

Closed
palevell opened this issue Nov 18, 2019 · 2 comments
Closed

Long Tweets: ERROR: Cannot write description file #23137

palevell opened this issue Nov 18, 2019 · 2 comments
Labels

Comments

@palevell
Copy link

@palevell palevell commented Nov 18, 2019

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2019.11.05
  • I've checked that all provided URLs are alive and playable in a browser
  • 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

Verbose log

[debug] System config: []
[debug] User config: ['-f', 'bestvideo[height<=480]+bestaudio[height<=480]/bestvideo[ext=mp4][height<=480]+bestaudio[ext=m4a][height<=480]/best[ext=mp4]/best', '-o', '~/Downloads/ydl/%(uploader)s/%(upload_date)s/%(title)s-%(id)s.%(ext)s', '-r', '250k', '--download-archive', '~/.local/share/YouTubeDL/archive.txt', '--exec', '~/bin/ydl-links', '--ignore-errors', '--max-filesize', '5000m', '--write-description', '--write-info-json', '--restrict-filenames', '--sleep-interval', '3', '--max-sleep-interval', '6', '--user-agent', 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.5 Lightning/5.4']
[debug] Custom config: []
[debug] Command-line args: ['-r5000k', '--verbose', 'https://twitter.com/45HammerTime/status/1196137235894165504']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2019.11.05
[debug] Python version 3.8.0 (CPython) - Linux-4.15.0-66-generic-x86_64-with-glibc2.27
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[twitter] 1196137235894165504: Downloading webpage
[twitter:card] 1196137235894165504: Downloading webpage
[twitter:card] 1196137235894165504: Downloading guest token
[twitter:card] 1196137235894165504: Downloading JSON metadata
[twitter:card] 1196137235894165504: Downloading m3u8 information
[info] Writing video description to: /home/patrick/Downloads/ydl/Mad_Dad/NA/Mad_Dad_-_Doctor_says_STOP_CALLING_Measles_a_disease_Fake_news_amp_Democrat_politicians_brainwash_you._Measles_is_not_a_disease_it_s_an_infection_and_have_lifetime_immunity_after_that._Vaccines_cause_disease_GetTheHat_U_Be...The_Billboard-1196137235894165504.description
ERROR: Cannot write description file /home/patrick/Downloads/ydl/Mad_Dad/NA/Mad_Dad_-_Doctor_says_STOP_CALLING_Measles_a_disease_Fake_news_amp_Democrat_politicians_brainwash_you._Measles_is_not_a_disease_it_s_an_infection_and_have_lifetime_immunity_after_that._Vaccines_cause_disease_GetTheHat_U_Be...The_Billboard-1196137235894165504.description
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 1784, in process_info
    with io.open(encodeFilename(descfn), 'w', encoding='utf-8') as descfile:
OSError: [Errno 36] File name too long: '/home/patrick/Downloads/ydl/Mad_Dad/NA/Mad_Dad_-_Doctor_says_STOP_CALLING_Measles_a_disease_Fake_news_amp_Democrat_politicians_brainwash_you._Measles_is_not_a_disease_it_s_an_infection_and_have_lifetime_immunity_after_that._Vaccines_cause_disease_GetTheHat_U_Be...The_Billboard-1196137235894165504.description'


Description

I believe this issue is related to Twitter increasing the tweet length to 280 characters--many file systems limit file names to 255 characters.

I created a patch and posted it as a Gist (click here)

@shillshocked
Copy link

@shillshocked shillshocked commented Jan 3, 2020

How is this issue solvable?

@palevell
Copy link
Author

@palevell palevell commented Jan 3, 2020

The way I understand the program, it needs to be addressed when the file template is created. What is causing errors is the "(title)s" variable, when it is longer than the filesystem allows. The maximum is usually 255 characters. Allowing for extra stuff in the filename, like "(id)s", "(ext)s", info.json, and .description, I think 200 characters is a reasonable limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.