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

AttributeError: 'NoneType' object has no attribute 'close' #22476

Open
TheSnoozer opened this issue Sep 21, 2019 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'close' #22476

TheSnoozer opened this issue Sep 21, 2019 · 0 comments

Comments

@TheSnoozer
Copy link

@TheSnoozer TheSnoozer commented Sep 21, 2019

Checklist

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

Log

[download]  17.2% of ~3.93GiB at  3.83KiB/s ETA --:--:--Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/http.py", line 230, in download
    data_block = ctx.data.read(block_size if not is_test else min(block_size, data_len - byte_counter))
  File "/usr/lib/python3.6/http/client.py", line 459, in read
    n = self.readinto(b)
  File "/usr/lib/python3.6/http/client.py", line 503, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.6/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 2010, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 807, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 861, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 1642, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 1917, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 1856, in dl
    return fd.download(name, info)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/hls.py", line 148, in real_download
    ctx, frag_url, info_dict, headers)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/fragment.py", line 102, in _download_fragment
    'http_headers': headers or info_dict.get('http_headers'),
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/http.py", line 342, in real_download
    return download()
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/http.py", line 234, in download
    retry(e)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/http.py", line 222, in retry
    ctx.stream.close()
AttributeError: 'NoneType' object has no attribute 'close'

Description

Use potato Internet and download with retry attempts (youtube-dl --retries 99999999999 --format 720p --keep-fragments URL). Some fragments could be downloaded already so I guess it seems to be a rare issue and doesn#t seem to be critical since I just can restart the download manually.

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