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

Some Errors Are Not Caught And Retried? #24188

Closed
VaslD opened this issue Feb 29, 2020 · 1 comment
Closed

Some Errors Are Not Caught And Retried? #24188

VaslD opened this issue Feb 29, 2020 · 1 comment

Comments

@VaslD
Copy link

@VaslD VaslD commented Feb 29, 2020

Checklist

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

See #23782.

Description

This is a related issue brought by #23782. I meant to comment on the original but decided to open a new one.

Just saw this error today and it’s starting to stick. (Maybe I downloaded too much and YouTube now hates me?) Restarting youtube-dl with the same URL works but it’s tedious procedure and this breaks my workflow a bit.

My issue isn’t exactly with this error code. Network condition shifts and weird error happens. I’m used to that.

The problem is I ran youtube-dl with -R infinite --fragment-retries infinite which should make YTDL swallow any errors and auto retry until the download is completed, given that I’m not offline. Even if I am offline, the command should hang (run indefinitely) because that’s what infinite retry means. Telling me there’s been an error after I supplied infinite retries as input isn’t what I expected.

@dstftw dstftw closed this Feb 29, 2020
@dstftw dstftw added the incomplete label Feb 29, 2020
@VaslD
Copy link
Author

@VaslD VaslD commented Feb 29, 2020

OK, incomplete tag huh?

In my defense, I didn't provide verbose log because I cannot reliably corrupt my network connection. It's a networking error, it doesn't happen all the time and when it does I can't foresee it to supply --verbose, can I? So I referenced a issue where someone had already provided detailed logs. I had the exact same issue, only in my case I added 2 retry options hoping to quick fix it on my end which didn't work.

If you really need logs, here they are.

> youtube-dl -R infinite --fragment-retries infinite --all-subs --write-thumbnail https://www.youtube.com/watch?v=f2aocKWrPG8 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-R', 'infinite', '--fragment-retries', 'infinite', '--all-subs', '--write-thumbnail', 'https://www.youtube.com/watch?v=f2aocKWrPG8', '--verbose']
[debug] Encodings: locale cp65001, fs utf-8, out utf-8, pref cp65001
[debug] youtube-dl version 2020.02.16
[debug] Python version 3.7.5 (CPython) - Windows-10-10.0.18362-SP0
[debug] exe versions: ffmpeg git-2020-01-10-3d894db, ffprobe git-2020-01-10-3d894db
[debug] Proxy map: {}
[youtube] f2aocKWrPG8: Downloading webpage
[youtube] f2aocKWrPG8: Downloading video info webpage
[youtube] {18} signature length 106, html5 player vflsFV4r3
[youtube] {22} signature length 106, html5 player vflsFV4r3
[youtube] {313} signature length 106, html5 player vflsFV4r3
[youtube] {271} signature length 102, html5 player vflsFV4r3
[youtube] {137} signature length 106, html5 player vflsFV4r3
[youtube] {248} signature length 106, html5 player vflsFV4r3
[youtube] {136} signature length 106, html5 player vflsFV4r3
[youtube] {247} signature length 102, html5 player vflsFV4r3
[youtube] {135} signature length 102, html5 player vflsFV4r3
[youtube] {244} signature length 106, html5 player vflsFV4r3
[youtube] {134} signature length 102, html5 player vflsFV4r3
[youtube] {243} signature length 106, html5 player vflsFV4r3
[youtube] {133} signature length 106, html5 player vflsFV4r3
[youtube] {242} signature length 106, html5 player vflsFV4r3
[youtube] {160} signature length 106, html5 player vflsFV4r3
[youtube] {278} signature length 106, html5 player vflsFV4r3
[youtube] {140} signature length 106, html5 player vflsFV4r3
[youtube] {249} signature length 106, html5 player vflsFV4r3
[youtube] {250} signature length 106, html5 player vflsFV4r3
[youtube] {251} signature length 102, html5 player vflsFV4r3
[youtube] {256} signature length 106, html5 player vflsFV4r3
[youtube] {258} signature length 106, html5 player vflsFV4r3
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.en.vtt
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.fr.vtt
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.de.vtt
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.hi.vtt
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.ko.vtt
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.pt-BR.vtt
[info] Writing video subtitles to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.es-419.vtt
[youtube] f2aocKWrPG8: Downloading thumbnail ...
[youtube] f2aocKWrPG8: Writing thumbnail to: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.jpg
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r1---sn-a5mekner.googlevideo.com/videoplayback?expire=1582993610&ei=ajxaXqK9E9CHkwayiYyoCQ&ip=38.143.2.245&id=o-AKv7eEjEOi5t7sp0Ipa-aUOAYyBfKKMc_4H_33AZO29Q&itag=313&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-a5mekner%2Csn-n4v7sn7s&ms=au%2Conr&mv=m&mvi=0&pl=24&gcr=us&initcwndbps=1685000&vprv=1&mime=video%2Fwebm&gir=yes&clen=3270649637&dur=2173.962&lmt=1576855798819191&mt=1582971929&fvip=1&keepalive=yes&fexp=23842630&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRAIgdO7hALB5v7onWhF9JRKrX_-z9TB1MLK-3J9LhUTqiZMCICjyqr7ii9bA5bvkF_5BjJ9mr9QpLPJI1JTKV02D_qd_&sig=ADKhkGMwRQIhAJGINTC91d-ZY6AGMTneuktB487OoK8FmQpaHi1s0jTgAiBIKpvu4FgJ8pd5-BdSvOhT0NJ_OmcZZTPjHvpVIA-G3Q==&ratebypass=yes'
[download] Resuming download at byte 243813871
[download] Destination: Will a robot take my job _ The Age of A.I.-f2aocKWrPG8.f313.webm
[download]  25.9% of 3.05GiB at  3.84MiB/s ETA 10:01    ERROR: unable to download video data: <urlopen error [Errno 0] Error>
Traceback (most recent call last):
  File "c:\program files\python 3.7\lib\urllib\request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "c:\program files\python 3.7\lib\http\client.py", line 1252, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "c:\program files\python 3.7\lib\http\client.py", line 1298, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "c:\program files\python 3.7\lib\http\client.py", line 1247, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "c:\program files\python 3.7\lib\http\client.py", line 1026, in _send_output
    self.send(msg)
  File "c:\program files\python 3.7\lib\http\client.py", line 966, in send
    self.connect()
  File "c:\program files\python 3.7\lib\http\client.py", line 1422, in connect
    server_hostname=server_hostname)
  File "c:\program files\python 3.7\lib\ssl.py", line 423, in wrap_socket
    session=session
  File "c:\program files\python 3.7\lib\ssl.py", line 870, in _create
    self.do_handshake()
  File "c:\program files\python 3.7\lib\ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
OSError: [Errno 0] Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\YoutubeDL.py", line 1919, in process_info
    partial_success = dl(fname, new_info)
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\YoutubeDL.py", line 1864, in dl
    return fd.download(name, info)
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\downloader\common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\downloader\http.py", line 341, in real_download
    establish_connection()
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\YoutubeDL.py", line 2237, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "c:\program files\python 3.7\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "c:\program files\python 3.7\lib\urllib\request.py", line 543, in _open
    '_open', req)
  File "c:\program files\python 3.7\lib\urllib\request.py", line 503, in _call_chain
    result = func(*args)
  File "C:\Users\DESKTOP-5871\AppData\Roaming\Python\Python37\site-packages\youtube_dl\utils.py", line 2728, in https_open
    req, **kwargs)
  File "c:\program files\python 3.7\lib\urllib\request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 0] Error>

> 

I ran the same download (URL) 3 times to get the error to occur. Didn't know if this changes anything, but like I said there's no way to reliably generate this error.

@dstftw dstftw added the duplicate label Feb 29, 2020
@ytdl-org ytdl-org locked and limited conversation to collaborators Feb 29, 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.