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

urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond #20717

Closed
mugenishere opened this issue Apr 19, 2019 · 1 comment

Comments

@mugenishere
Copy link

@mugenishere mugenishere commented Apr 19, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.04.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.04.17

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2019.04.17
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

Sure! Here's the output:

C:\Mugen\somedir>youtube-dl -v -o "C:/Mugen/somedir/test.mp4" https://www.youtube.com/embed/fnExcEbTjSI -f "bestvideo[height<=480] + bestaudio/best[height<=480]"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-o', 'C:/Mugen/somedir/test.mp4', 'https://www.youtube.com/embed/fnExcEbTjSI', '-f', 'bestvideo[height<=480] + bestaudio/best[height<=480]']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2019.04.17
[debug] Python version 3.6.2 (CPython) - Windows-10-10.0.17134-SP0
[debug] exe versions: ffmpeg git-2017-12-29-0c78b6a, ffprobe git-2017-12-29-0c78b6a
[debug] Proxy map: {}
[youtube] fnExcEbTjSI: Downloading webpage
[youtube] fnExcEbTjSI: Downloading video info webpage
[youtube] fnExcEbTjSI: Downloading MPD manifest
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/dash/ip/122.171.163.242/key/yt6/itag/0/pl/20/mv/m/source/youtube/ms/au%2Crdu/beids/23806821/mn/sn-ci5gup-cags%2Csn-ci5gup-h55e/sparams/as%2Cei%2Chfr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cplayback_host%2Crequiressl%2Csource%2Cexpire/expire/1555707786/id/7e71317046d38d22/ipbits/0/signature/ABEA893B298D99A01D963D1E86C42FF91C1420C3.ADF9854424DC0E8616BD491620383CD4409EC0FA/playback_host/r3---sn-ci5gup-cags.googlevideo.com/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/fvip/7/ei/KuO5XJO_D4iaoAOYg4rwAw/requiressl/yes/mm/31%2C29/hfr/all/initcwndbps/916250/mt/1555686045'
[dashsegments] Total fragments: 62
[download] Destination: C:\Mugen\somedir\test.f135.mp4
ERROR: unable to download video data: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\urllib\request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "c:\program files (x86)\python36-32\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "c:\program files (x86)\python36-32\lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "c:\program files (x86)\python36-32\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "c:\program files (x86)\python36-32\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "c:\program files (x86)\python36-32\lib\http\client.py", line 964, in send
self.connect()
File "c:\program files (x86)\python36-32\lib\http\client.py", line 1392, in connect
super().connect()
File "c:\program files (x86)\python36-32\lib\http\client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "c:\program files (x86)\python36-32\lib\socket.py", line 722, in create_connection
raise err
File "c:\program files (x86)\python36-32\lib\socket.py", line 713, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1909, in process_info
partial_success = dl(fname, new_info)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1854, in dl
return fd.download(name, info)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\downloader\common.py", line 364, in download
return self.real_download(filename, info_dict)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\downloader\dash.py", line 48, in real_download
success, frag_content = self._download_fragment(ctx, fragment_url, info_dict)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\downloader\fragment.py", line 102, in _download_fragment
'http_headers': headers or info_dict.get('http_headers'),
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\downloader\common.py", line 364, in download
return self.real_download(filename, info_dict)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\downloader\http.py", line 341, in real_download
establish_connection()
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
ctx.data = self.ydl.urlopen(request)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 2227, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "c:\program files (x86)\python36-32\lib\urllib\request.py", line 526, in open
response = self._open(req, data)
File "c:\program files (x86)\python36-32\lib\urllib\request.py", line 544, in _open
'_open', req)
File "c:\program files (x86)\python36-32\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "c:\program files (x86)\python36-32\lib\site-packages\youtube_dl\utils.py", line 1140, in https_open
req, **kwargs)
File "c:\program files (x86)\python36-32\lib\urllib\request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>


Description of your issue, suggested solution and other information

  • There are no credentials required for this.
  • How to reproduce: Just run this command on cmd prompt (I'm running elevated privileges but this issue is reproducible even on a normal cmd prompt):

youtube-dl -v -o "C:/Mugen/somedir/test.mp4" https://www.youtube.com/embed/fnExcEbTjSI -f "bestvideo[height<=480] + bestaudio/best[height<=480]"

  • This issue is consistently happening for some of my URLs (about 10-15%). The URL provided in here is an example where it's consistently reproducible.

  • I also tried downloading by removing that -f command at the end. In this case it starts the download at 1.5% and then terminates.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 21, 2019

Most likely a network issue on your side.

@dstftw dstftw closed this Apr 21, 2019
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.