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

Downloads don't complete, stuck with operation timed out error #116

Open
vishwesh-D-kumar opened this issue Feb 11, 2021 · 0 comments
Open

Comments

@vishwesh-D-kumar
Copy link

vishwesh-D-kumar commented Feb 11, 2021

A great tool ! Thanks for developing . I have been able to download the VOD chats for several streamers using this , however with large streamers like xQc, there seems to be an error in the downloads.

tcd --channel xqcow --first=1 --format json --output xqcowchats/

The following error pops up at around 30% of the downloads( have replaced actual cursor value with multiple x's)

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connection.py", line 334, in connect
    conn = self._new_conn()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7ffdb3e717f0>: Failed to establish a new connection: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.twitch.tv', port=443): Max retries exceeded with url: /v5/videos/909055006/comments?cursor=xxxxxxxxxx(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ffdb3e717f0>: Failed to establish a new connection: [Errno 60] Operation timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/tcd", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tcd/__init__.py", line 92, in main
    Downloader().channels(Arguments().channels)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tcd/downloader.py", line 195, in channels
    self.video(video)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tcd/downloader.py", line 100, in video
    for comment in video.comments:
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/twitch/v5/resources/comments.py", line 22, in __iter__
    fragment = self.fragment(fragment['_next'])
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/twitch/v5/resources/comments.py", line 16, in fragment
    return self._api.get(self._path.format(video_id=self._video_id), params={'cursor': cursor})
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/twitch/api.py", line 111, in get
    return self.request('GET', path, ignore_cache, params=params, headers=self._headers(headers), **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/twitch/api.py", line 90, in request
    response = requests.Session().send(request)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.twitch.tv', port=443): Max retries exceeded with url: /v5/videos/909055006/comments?cursor=xxxxxx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ffdb3e717f0>: Failed to establish a new connection: [Errno 60] Operation timed out'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant