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

Video download freezes around 50% then crashes with "ERROR: unable to download video data: <urlopen error [Errno 0] Error>" #21854

Closed
kik4444 opened this issue Jul 22, 2019 · 1 comment

Comments

@kik4444
Copy link

@kik4444 kik4444 commented Jul 22, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.07.16
  • 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 bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-f', u'bestvideo[fps=60]+bestaudio/bestvideo+bestaudio/best', u'-o', u'/mnt/f/Temp/%(title)s.%(ext)s', u'--no-mtime', u'--write-sub', u'--all-subs', u'--embed-subs', u'-v', u'https://www.youtube.com/watch?v=PNtKXWNKGN8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 2.7.15+ (CPython) - Linux-4.4.0-17763-Microsoft-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[youtube] PNtKXWNKGN8: Downloading webpage
[youtube] PNtKXWNKGN8: Downloading video info webpage
[info] Writing video subtitles to: /mnt/f/Temp/Simulating Supply and Demand.en.vtt
[debug] Invoking downloader on u'https://r7---sn-gvopm-vu2e.googlevideo.com/videoplayback?expire=1563777030&ei=pQM1Xar7O5Kz1wLThYGIBQ&ip=94.176.148.34&id=o-ANBz7l24akgeIJckvxskt5GrjNP1mqUs6XTtQ2NsPeR5&itag=303&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C298%2C299%2C302%2C303%2C394%2C395%2C396%2C397%2C398&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-gvopm-vu2e%2Csn-4g5e6nz7&ms=au%2Crdu&mv=m&mvi=6&pl=24&initcwndbps=201250&mime=video%2Fwebm&gir=yes&clen=49115981&dur=741.916&lmt=1556996340744620&mt=1563755291&fvip=2&keepalive=yes&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRQIgGdRZblCfOuvKBdaa9gWvreXK-9CzhmfEdJPsK93T3JsCIQCE6usmbnd81IyINgt-qrh_WkccutF7_sDZeyTsoETlUA%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRgIhAOeOZOKoDE8nyVWgNeZ2RSnc3udOruKTlr399q40ASgWAiEAvR6qD1fkUU6HjvJGmib9ddeGk4yIX0JQe9Xi9OaOKRo%3D&ratebypass=yes'
[download] Destination: /mnt/f/Temp/Simulating Supply and Demand.f303.webm
[download]  20.7% of 46.84MiB at  9.51MiB/s ETA 00:03ERROR: unable to download video data: <urlopen error [Errno 0] Error>
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1909, in process_info
    partial_success = dl(fname, new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1854, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 2724, in https_open
    req, **kwargs)
  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 0] Error>

Description

As of today whenever I try to download a video either through the windows version of youtube-dl or the ubuntu version that's running in Windows's WSL, I get an error that says "ERROR: unable to download video data: <urlopen error [Errno 0] Error>" shortly after the video starts downloading and then freezes. The above error and verbose log are from Windows's WSL. Although the error can be slightly different sometimes. I've noticed that it usually happens around 50% of the video. I should note that it worked in the morning and since then I've had the same version so I'm assuming this could be a youtube problem.

If it helps here's the same problem from the native Windows version continuing off where the last failed

[debug] System config: []
[debug] User config: ['-f', 'bestvideo[fps=60]+bestaudio/bestvideo+bestaudio/best', '-o', 'F:/Temp/%(title)s.%(ext)s', '--no-mtime', '--write-sub', '--all-subs', '--embed-subs']
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=PNtKXWNKGN8']
[debug] Encodings: locale cp65001, fs mbcs, out cp65001, pref cp65001
[debug] youtube-dl version 2019.07.16
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg 3.4.2, ffprobe 3.4.2
[debug] Proxy map: {}
[youtube] PNtKXWNKGN8: Downloading webpage
[youtube] PNtKXWNKGN8: Downloading video info webpage
[info] Writing video subtitles to: F:\Temp\Simulating Supply and Demand.en.vtt
[debug] Invoking downloader on 'https://r7---sn-gvopm-vu2e.googlevideo.com/videoplayback?expire=1563777451&ei=SwU1XdBW0qWBB-O5gaAC&ip=94.176.148.34&id=o-AFws_riCPivVD66rqMQyJtvVJyCFrTvcSibIaWd9fpcq&itag=303&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C298%2C299%2C302%2C303%2C394%2C395%2C396%2C397%2C398&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-gvopm-vu2e%2Csn-4g5e6nz7&ms=au%2Crdu&mv=m&mvi=6&pl=24&initcwndbps=195000&mime=video%2Fwebm&gir=yes&clen=49115981&dur=741.916&lmt=1556996340744620&mt=1563755698&fvip=2&keepalive=yes&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRgIhAM01FCIpTYAMtxbg11TTM6I1a89oB0NkS179cf793ibdAiEAo8ZUqI0DsCHo8tijsA4YI4SG8uAcffxGcOuM3BebsWM%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgbT_36q8mMoD3Jwh1EfjMO7zb7bvvLga2gHr58gBJlk4CIGiaTz5iSUlwHEnx7D-Jq1icuySxf0N44y7KP9tiwc-E&ratebypass=yes'
[download] Resuming download at byte 10186403
[download] Destination: F:\Temp\Simulating Supply and Demand.f303.webm
[download]  58.6% of 46.84MiB at 68.93KiB/s ETA 04:48 ERROR: unable to download video data: <urlopen error EOF occurred in violation of protocol (_ssl.c:600)>
Traceback (most recent call last):
  File "C:\Python\Python34\lib\urllib\request.py", line 1183, in do_open
  File "C:\Python\Python34\lib\http\client.py", line 1137, in request
  File "C:\Python\Python34\lib\http\client.py", line 1182, in _send_request
  File "C:\Python\Python34\lib\http\client.py", line 1133, in endheaders
  File "C:\Python\Python34\lib\http\client.py", line 963, in _send_output
  File "C:\Python\Python34\lib\http\client.py", line 898, in send
  File "C:\Python\Python34\lib\http\client.py", line 1287, in connect
  File "C:\Python\Python34\lib\ssl.py", line 362, in wrap_socket
  File "C:\Python\Python34\lib\ssl.py", line 580, in __init__
  File "C:\Python\Python34\lib\ssl.py", line 807, in do_handshake
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\YoutubeDL.py", line 1909, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\YoutubeDL.py", line 1854, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\downloader\common.py", line 366, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\downloader\http.py", line 341, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\downloader\http.py", line 109, in establish_connection
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\YoutubeDL.py", line 2227, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 464, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 482, in _open
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpaxmfe_l6\build\youtube_dl\utils.py", line 2724, in https_open
  File "C:\Python\Python34\lib\urllib\request.py", line 1185, in do_open
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:600)>

And again the same problem from a real linux OS Manjaro (it actually lasted a lot longer before finally stopping and printing its error)

debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'bestvideo[fps=60]+bestaudio/bestvideo+bestaudio/best', '-o', '/run/media/kiko/General/Movies/Temp/%(title)s.%(ext)s', '--no-mtime', '--write-sub', '--all-subs', '--embed-subs', '-v', 'https://www.youtube.com/watch?v=PNtKXWNKGN8']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 3.7.3 (CPython) - Linux-4.19.59-1-MANJARO-x86_64-with-arch-Manjaro-Linux
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] PNtKXWNKGN8: Downloading webpage
[youtube] PNtKXWNKGN8: Downloading video info webpage
[info] Writing video subtitles to: /run/media/kiko/General/Movies/Temp/Simulating Supply and Demand.en.vtt
[debug] Invoking downloader on 'https://r7---sn-gvopm-vu2e.googlevideo.com/videoplayback?expire=1563777278&ei=ngQ1XYSCLJ3B1gKS1oqIDg&ip=86.105.25.70&id=o-AJ6YKtw4V96bt8vd126hi6d2UxuuCb0iIIhcAp8eEZEe&itag=303&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C298%2C299%2C302%2C303%2C394%2C395%2C396%2C397%2C398&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-gvopm-vu2e%2Csn-4g5ednsr&ms=au%2Crdu&mv=m&mvi=6&pl=24&initcwndbps=277500&mime=video%2Fwebm&gir=yes&clen=49115981&dur=741.916&lmt=1556996340744620&mt=1563755573&fvip=2&keepalive=yes&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRgIhAJSIy2GjTVRlyn2h3jvUXcKrkOeRE6OjcvQ4rnR-0p2gAiEA2SLIqTfevWzAF-Xzc7eGve3AIvuvJJYuECaz1NREkNM%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRgIhAIU2I2ALRn7fRArbgtzhQusuB41WZsGAxW1b-BxC07DxAiEA50EkNgyST9apFu3pny7xORygTx2pXAnVGEOPFf66MuE%3D&ratebypass=yes'
[download] Destination: /run/media/kiko/General/Movies/Temp/Simulating Supply and Demand.f303.webm
[download]  57.5% of 46.84MiB at 88.62KiB/s ETA 03:49[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 1 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 2 of 10)...
[download]  58.6% of 46.84MiB at 11.16KiB/s ETA 29:40[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 3 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 4 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 5 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 6 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 7 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 8 of 10)...
[download]  59.2% of 46.84MiB at 12.45KiB/s ETA 26:12[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 9 of 10)...
[download] Got server HTTP error: HTTP Error 503: Service Unavailable. Retrying (attempt 10 of 10)...
ERROR: giving up after 10 retries
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2008, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 807, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 861, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1642, in process_video_result
    self.process_info(new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1909, in process_info
    partial_success = dl(fname, new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1854, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 353, in real_download
    self.report_error('giving up after %s retries' % retries)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 165, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 624, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 586, in trouble
    tb_data = traceback.format_list(traceback.extract_stack()) 
@dstftw dstftw closed this Jul 22, 2019
@kik4444
Copy link
Author

@kik4444 kik4444 commented Jul 22, 2019

I think the problem might actually be from Youtube after all. When I changed servers on my VPN the problem seemingly went away instantly. Maybe it was related to my IP. But on second thought that doesn't explain why I was able to reproduce it on a completely separate system, unless it coincidentally it also had the same IP, because it was on the same server. I don't remember what the IPs were though.

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.