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

ValueError: time data '' does not match format '%Y%m%d' #7875

Closed
usagicore opened this issue Dec 15, 2015 · 10 comments
Closed

ValueError: time data '' does not match format '%Y%m%d' #7875

usagicore opened this issue Dec 15, 2015 · 10 comments

Comments

@usagicore
Copy link

@usagicore usagicore commented Dec 15, 2015

using version 2015.12.13
#772 looks similar but thats old and mine does not print any time data.

also tried other videos without proxy.

python3 /tmp/mnt/usb/scripts/youtube-dl --proxy "157.7.242.91:8080" --no-check-certificate -f 22 https://www.youtube.com/watch?v=eRp6kHSbdN8
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[youtube] eRp6kHSbdN8: Downloading webpage
[youtube] eRp6kHSbdN8: Downloading video info webpage
[youtube] eRp6kHSbdN8: Extracting video information
[youtube] eRp6kHSbdN8: Downloading DASH manifest
[youtube] eRp6kHSbdN8: Downloading DASH manifest
Traceback (most recent call last):
  File "/opt/lib/python3.2/runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/lib/python3.2/runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "/tmp/mnt/usb/scripts/youtube-dl/__main__.py", line 19, in <module>
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/__init__.py", line 410, in main
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/__init__.py", line 400, in _real_main
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/YoutubeDL.py", line 1675, in download
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/YoutubeDL.py", line 674, in extract_info
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/YoutubeDL.py", line 720, in process_ie_result
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/YoutubeDL.py", line 1345, in process_video_result
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/YoutubeDL.py", line 1416, in process_info
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/YoutubeDL.py", line 608, in _match_entry
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/utils.py", line 1029, in __contains__
  File "/tmp/mnt/usb/scripts/youtube-dl/youtube_dl/utils.py", line 992, in date_from_str
  File "/opt/lib/python3.2/_strptime.py", line 488, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/opt/lib/python3.2/_strptime.py", line 337, in _strptime
    (data_string, format))
ValueError: time data '' does not match format '%Y%m%d'
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 15, 2015

Post the output of python3 /tmp/mnt/usb/scripts/youtube-dl --proxy "157.7.242.91:8080" --no-check-certificate -f 22 https://www.youtube.com/watch?v=eRp6kHSbdN8 --dump-pages -v.

@usagicore
Copy link
Author

@usagicore usagicore commented Dec 15, 2015

The comment was too long

http://pastebin.com/PdXDQ3DK

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 15, 2015

This log misses important [debug] ... info.

@usagicore
Copy link
Author

@usagicore usagicore commented Dec 15, 2015

oops notification mail ignored -v
http://pastebin.com/6N7Jb9XQ

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 15, 2015

Have you modified the source code?

@usagicore
Copy link
Author

@usagicore usagicore commented Dec 15, 2015

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 15, 2015

Post the output of md5sum /tmp/mnt/usb/scripts/youtube-dl.

@usagicore
Copy link
Author

@usagicore usagicore commented Dec 15, 2015

2be0126739e0abd48cbf660bd8291c05

@lassuviz
Copy link

@lassuviz lassuviz commented Jan 28, 2016

I got the very same issue here (for all videos on youtube), but I have managed to fix it.
Around line 610 in YoutubeDL.py comment out the following 2 lines:

lassuviz null date fix

if date not in dateRange:

return '%s upload date is not in range %s' % (date_from_str(date).isoformat(), dateRange)

Apply these 2 # and youtube-dl will start to download videos !!!

I am not sure if it has side-effect for special download cases (ie. daterange), but works well flawlessly on normal and playlist download on youtube. :)

I am not python expert, nor familiar with the internals of youtube-dl but I think some system (including mine) supplies/parses date in a wrong manner.

If someone could make this null date fix properly on the code-base (regarding my finding) I would be very happy, because I just love youtube-dl project. It is just great!

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 22, 2016

I guess this is caused by broken wcsftime in libc. See #9557 for how to check libc. Feel free to leave a comment if your libc is working while youtube-dl not.

@yan12125 yan12125 closed this May 22, 2016
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
4 participants
You can’t perform that action at this time.