Rafficer/reddit-analyzer

Errors with All Dependencies Installed

apmunch opened this issue · 0 comments

Hi there. Could use some help with the following errors on macOS 12.5 with Python 3.10 installed...

`$ pip3 install -r requirements.txt

Requirement already satisfied: ascii_graph in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.5.1)

Requirement already satisfied: numpy in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (1.23.2)

Requirement already satisfied: colorama in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (0.4.5)

Requirement already satisfied: requests in /opt/homebrew/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (2.28.1)

Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/lib/python3.10/site-packages (from requests->-r requirements.txt (line 4)) (2.7)

Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/homebrew/lib/python3.10/site-packages (from requests->-r requirements.txt (line 4)) (1.23)

Requirement already satisfied: charset-normalizer<3,>=2 in /opt/homebrew/lib/python3.10/site-packages (from requests->-r requirements.txt (line 4)) (2.1.0)

Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/lib/python3.10/site-packages (from requests->-r requirements.txt (line 4)) (2018.8.24)`

Then running:

python3 analyzer.py -u UserName

Getting the errors:

`Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connection.py", line 170, in _new_conn
conn = connection.create_connection(
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/util/connection.py", line 56, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/opt/homebrew/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 597, in urlopen
httplib_response = self._make_request(conn, method, url,
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connection.py", line 179, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x10252d570>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 637, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.reddit.com', port=443): Max retries exceeded with url: /user/Andrew-CS/about (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10252d570>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/amunchbach/Documents/tools/reddit-analyzer/analyzer.py", line 351, in
accountstats = apirequest(f"https://api.reddit.com/user/{args.user}/about")
File "/Users/amunchbach/Documents/tools/reddit-analyzer/analyzer.py", line 44, in apirequest
res = requests.get(url, headers=request_headers)
File "/opt/homebrew/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.reddit.com', port=443): Max retries exceeded with url: /user/Andrew-CS/about (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10252d570>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))`