question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=None)

See original GitHub issue

See this error in Logs. I have no proxy, VPN. Direct Internet. This is the full Python Script: https://pastebin.com/u5VS9QPn

Expected Result

No errors.

Actual Result

Traceback (most recent call last): File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 384, in _make_request six.raise_from(e, None) File “<string>”, line 2, in raise_from File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 380, in _make_request httplib_response = conn.getresponse() File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py”, line 1331, in getresponse response.begin() File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py”, line 297, in begin version, status, reason = self._read_status() File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py”, line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py”, line 586, in readinto return self._sock.recv_into(b) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 1009, in recv_into return self.read(nbytes, buffer) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 871, in read return self._sslobj.read(len, buffer) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 631, in read v = self._sslobj.read(len, buffer) 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.6/lib/python3.6/site-packages/requests/adapters.py”, line 445, in send timeout=timeout File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 638, in urlopen _stacktrace=sys.exc_info()[2]) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/util/retry.py”, line 367, in increment raise six.reraise(type(error), error, _stacktrace) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/packages/six.py”, line 686, in reraise raise value File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 600, in urlopen chunked=chunked) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 386, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 317, in _raise_timeout raise ReadTimeoutError(self, url, “Read timed out. (read timeout=%s)” % timeout_value) urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘stats.nba.com’, port=443): Read timed out. (read timeout=None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/Users/perksofthesewalls/Documents/Reddit/r:Warriors/Python/warriorssidebar6.py”, line 145, in <module> data = getUrlContent2(url) File “/Users/perksofthesewalls/Documents/Reddit/r:Warriors/Python/warriorssidebar6.py”, line 16, in getUrlContent2 response = requests.get(url, headers=headers) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py”, line 72, in get return request(‘get’, url, params=params, **kwargs) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py”, line 58, in request return session.request(method=method, url=url, **kwargs) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py”, line 512, in request resp = self.send(prep, **send_kwargs) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py”, line 644, in send history = [resp for resp in gen] if allow_redirects else [] File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py”, line 644, in <listcomp> history = [resp for resp in gen] if allow_redirects else [] File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py”, line 222, in resolve_redirects **adapter_kwargs File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py”, line 622, in send r = adapter.send(request, **kwargs) File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/adapters.py”, line 526, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host=‘stats.nba.com’, port=443): Read timed out. (read timeout=None)

Reproduction Steps

import requests

System Information

$ python -m requests.help
<paste here>

This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
SeungWookHancommented, Sep 22, 2020

Use Google Chrome and go here (https://www.whatismybrowser.com/detect/what-is-my-user-agent) and then copy the User-Agent and paste to your code like below: headers={ “User-Agent”:“your User-Agent”}

type tho headers in requests.get tag like this: res = requests.get(url, headers=headers)

0reactions
OmegaP1commented, Jan 19, 2021

(https://www.whatismybrowser.com/detect/what-is-my-user-agent

How do you do that ? theres = requests.get(url, headers=headers) part

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTPSConnectionPool(host='stats.nba.com', port=443): Read ...
However, on my web app, I receive a HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=30) on my first call.
Read more >
HTTPSConnectionPool(host='', port=443): Read timed out ...
I was helped by increasing the timeout, immediately set 120 seconds. It turned out that the response from the server comes within 40 ......
Read more >
Deploying NBA app in heroku, error HTTPSConnectionPool ...
Matplotlib error is fixed, but I've the first one again: HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=30).
Read more >
HTTPSConnectionPool(host='api.kite.trade', port=443)
Hi I got this error while placing order HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read time out=7)
Read more >
Getting "error with request HTTPSConnectionPool(host='oauth ...
PRAW: Getting "error with request HTTPSConnectionPool(host='oauth.reddit.com', port=443): Read timed out. (read timeout=16.0)" every couple ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found