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

[twitch] OSError: [Errno 36] File name too long #24575

Closed
pva opened this issue Apr 2, 2020 · 1 comment
Closed

[twitch] OSError: [Errno 36] File name too long #24575

pva opened this issue Apr 2, 2020 · 1 comment
Labels

Comments

@pva
Copy link

@pva pva commented Apr 2, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • 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

$ youtube-dl -v https://www.twitch.tv/videos/576778836
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.twitch.tv/videos/576778836']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.08
[debug] Python version 3.7.6 (CPython) - Linux-5.4.24-x86_64-Intel-R-_Core-TM-_i7-3520M_CPU_@_2.90GHz-with-gentoo-2.6
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2, rtmpdump 2.4
[debug] Proxy map: {}
[twitch:vod] 576778836: Downloading my vod info JSON
[twitch:vod] 576778836: Downloading vod access token
[twitch:vod] 576778836: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://d2nvs31859zcd8.cloudfront.net/abecf4b0970e9ddda88d_kinkmoscow_983036369_61498773/chunked/index-dvr.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 312
[download] Destination: Сегодня 5 день - контроль положения тела модели при грудных обвязках, разбор физиологии (база), разные варианты грудных обвязок -v576778836.mp4
ERROR: unable to open for writing: [Errno 36] File name too long: 'Сегодня 5 день - контроль положения тела модели при грудных обвязках, разбор физиологии (база), разные варианты грудных обвязок -v576778836.mp4.part-Frag0.part'
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/youtube_dl/downloader/http.py", line 250, in download
    ctx.tmpfilename, ctx.open_mode)
  File "/usr/lib/python3.7/site-packages/youtube_dl/utils.py", line 2046, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
OSError: [Errno 36] File name too long: 'Сегодня 5 день - контроль положения тела модели при грудных обвязках, разбор физиологии (база), разные варианты грудных обвязок -v576778836.mp4.part-Frag0.part'

Description

Most filesystems have limit of 255 bytes on the filename. Since Unicode takes twice (or even more) in bytes it's very easy to overcome this limit.

@dstftw dstftw closed this Apr 2, 2020
@dstftw dstftw added the duplicate label Apr 2, 2020
@pva
Copy link
Author

@pva pva commented Apr 2, 2020

I'm sorry but why is is ticket a duplicate? As I see there are tickets for youtube and vimeo but I failed to find for twitch. And as for twitch it's easy to fix issue by stripping length of title.

@ytdl-org ytdl-org deleted a comment from sputnick-dev Apr 14, 2020
@ytdl-org ytdl-org locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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