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

Issues downloading fragments, fragments downloaded but filename is wrong #13475

Closed
ankenyr opened this issue Jun 23, 2017 · 8 comments
Closed

Issues downloading fragments, fragments downloaded but filename is wrong #13475

ankenyr opened this issue Jun 23, 2017 · 8 comments

Comments

@ankenyr
Copy link
Contributor

@ankenyr ankenyr commented Jun 23, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.06.23
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

There seems to be an issue downloading some fragments where it passes the wrong name. The following video plus some others are giving me this issue.
https://www.youtube.com/watch?v=lQgKcvlrycs

The weird part is that if I am to change to a new directory this problem doesn't appear. This is not a issue with permissions as the thumbnail and other information is written to the disk. Logs are provided below.
Happy to do any troubleshooting to help find the cause.

C:\Users\Rob\Google Drive\Projects\youtube-dl>python downloader.py
Education
WARNING: Parameter outtmpl is bytes, but should be a unicode string. Put  from __future__ import unicode_literals  at the top of your code file or consider switching to Python 3.x.
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.06.23
[debug] Python version 2.7.10 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-86383-g4705edb, ffprobe N-86383-g4705edb
[debug] Proxy map: {}
[youtube:playlist] PLMLJ9CnbaPl1IMvgLI6oHfazZDiYKA01f: Downloading webpage
[download] Downloading playlist: Education
[youtube:playlist] playlist Education: Downloading 2 videos
[download] Downloading video 1 of 2
[download] Creating a Writing System has already been recorded in archive
<snip>
[download] Downloading video 78 of 214
[download] Mitigating LangSec Problems With Capabilities has already been recorded in archive
[download] Downloading video 79 of 214
[youtube] lQgKcvlrycs: Downloading webpage
[youtube] lQgKcvlrycs: Downloading video info webpage
[youtube] lQgKcvlrycs: Extracting video information
WARNING: video doesn't have subtitles
[youtube] lQgKcvlrycs: Searching for annotations.
[youtube] lQgKcvlrycs: Downloading MPD manifest
[youtube] lQgKcvlrycs: Downloading MPD manifest
[info] Video description is already present
[info] Video annotations are already present
[info] Video description metadata is already present
[youtube] lQgKcvlrycs: Thumbnail is already present
[debug] Invoking downloader on u'https://r5---sn-n4v7sn7z.googlevideo.com/videoplayback/id/95080a72f96bc9cb/itag/136/source/youtube/requiressl/yes/ei/q8BMWcOHApHN-wP624vABA/mm/31/mn/sn-n4v7sn7z/ms/au/
mv/m/pl/32/initcwndbps/1696250/ratebypass/yes/mime/video%2Fmp4/otfp/1/gir/yes/clen/144868518/lmt/1469587634924111/dur/1392.499/key/dg_yt0/signature/49BEE54C3E1D1F1072A9A7909142BF600045FE3F.66F2CE44FA4
77FB6EFD107E44D6482FE60776763/mt/1498202198/ip/2603:3024:1822:de00:f079:9c5f:44a5:6fac/ipbits/0/expire/1498223883/sparams/ip,ipbits,expire,id,itag,source,requiressl,ei,mm,mn,ms,mv,pl,initcwndbps,rateb
ypass,mime,otfp,gir,clen,lmt,dur/'
[dashsegments] Total fragments: 262
[download] Destination: Z:\Media\Educational\Education\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_An_Unorthodox_Manifesto [lQgKcvlrycs].f136.mp4
ERROR: unable to open for writing: [Errno 22] invalid mode ('wb') or filename: u'Z:\\Media\\Educational\\Education\\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_A
n_Unorthodox_Manifesto [lQgKcvlrycs].f136.mp4.part-Frag0.part'
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\youtube_dl\downloader\http.py", line 175, in real_download
    (stream, tmpfilename) = sanitize_open(tmpfilename, open_mode)
  File "C:\Python27\lib\site-packages\youtube_dl\utils.py", line 454, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 22] invalid mode ('wb') or filename: u'Z:\\Media\\Educational\\Education\\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_An_Unorthodox_Manifesto [lQ
gKcvlrycs].f136.mp4.part-Frag0.part'

[debug] Invoking downloader on u'https://r5---sn-n4v7sn7z.googlevideo.com/videoplayback/id/95080a72f96bc9cb/itag/140/source/youtube/requiressl/yes/ei/q8BMWcOHApHN-wP624vABA/mm/31/mn/sn-n4v7sn7z/ms/au/
mv/m/pl/32/initcwndbps/1696250/ratebypass/yes/mime/audio%2Fmp4/otfp/1/gir/yes/clen/22133825/lmt/1469587701579327/dur/1392.547/key/dg_yt0/signature/93BDE94BDB0B34C7FEBE39EF91455ED2CC6465A5.2FBC51CCD561
739C024F4D1E558754C1AE69618B/mt/1498202198/ip/2603:3024:1822:de00:f079:9c5f:44a5:6fac/ipbits/0/expire/1498223883/sparams/ip,ipbits,expire,id,itag,source,requiressl,ei,mm,mn,ms,mv,pl,initcwndbps,rateby
pass,mime,otfp,gir,clen,lmt,dur/'
[dashsegments] Total fragments: 280
[download] Destination: Z:\Media\Educational\Education\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_An_Unorthodox_Manifesto [lQgKcvlrycs].f140.m4a
ERROR: unable to open for writing: [Errno 22] invalid mode ('wb') or filename: u'Z:\\Media\\Educational\\Education\\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_A
n_Unorthodox_Manifesto [lQgKcvlrycs].f140.m4a.part-Frag0.part'
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\youtube_dl\downloader\http.py", line 175, in real_download
    (stream, tmpfilename) = sanitize_open(tmpfilename, open_mode)
  File "C:\Python27\lib\site-packages\youtube_dl\utils.py", line 454, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
IOError: [Errno 22] invalid mode ('wb') or filename: u'Z:\\Media\\Educational\\Education\\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_An_Unorthodox_Manifesto [lQ
gKcvlrycs].f140.m4a.part-Frag0.part'

[download] Downloading video 80 of 214
[download] Complex Paths and Derelict Sentinels: software engineering underpinnings of NTP vulnerabilities has already been recorded in archive
<snip>
[download] Downloading video 214 of 214
[download] Clash Attacks on the Verifiability of E-Voting Systems has already been recorded in archive
[download] Finished downloading playlist: Uploads from IEEE Symposium on Security and Privacy
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 23, 2017

Obviously a problem with your storage.

@dstftw dstftw closed this Jun 23, 2017
@ankenyr
Copy link
Contributor Author

@ankenyr ankenyr commented Jun 23, 2017

I don't think it is a problem with my storage. I am able to download everything else from the playlist. Why do you think this is a problem with my storage?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 23, 2017

if I am to change to a new directory this problem doesn't appear

@ankenyr
Copy link
Contributor Author

@ankenyr ankenyr commented Jun 23, 2017

This looks to me like there is something wrong with a variable being passed along. It saves a file named
'Z:\Media\Educational\Education\20160901-UC6pXMS7qre9GZW7A7FVM90Q-Safety_to_the_Weak_Security_Through_Feebleness_-_An_Unorthodox_Manifesto [lQ
gKcvlrycs].f140.m4a.part. I can see that on the file system but the error is looking for something called with the extension -Frag0.part.

@ankenyr
Copy link
Contributor Author

@ankenyr ankenyr commented Jun 23, 2017

Hi @dstftw, not sure if you muted this or not, hoping to get one more reply. I really don't think it has to do with the storage considering the naming part. Can you please just confirm that you think it is still storage even with the naming difference above? It looks like youtube-dl is looking for an incorrectly named file.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 23, 2017

It does not look for incorrectly named file, it tries to write this file that is clearly seen from your log.

@ankenyr
Copy link
Contributor Author

@ankenyr ankenyr commented Jun 23, 2017

ohh jeez, sorry! Looks like it is storage, I was getting confused because all the other files including the f136.mp4 file were created, those were empty though. I would have expected those would not be touched until it got all the fragments. It was also confusing because I use ext4 and this should not be over the limit for a filename but just using plain old python and trying to write to the file gave me an IO error. Looking further into this it seems that if you are using encryption on synology it for some reason limits the filename length to 143 characters which this is above by just a bit.

Thank you @dstftw for pointing that out, similar to writing an essay and missing spelling errors, sometimes you do not see what is in the log clearly spelling something out to you.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 23, 2017

143 chars limitation for NAME_MAX on encrypted FS is a known issue #5908.

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
2 participants
You can’t perform that action at this time.