sharkwouter / minigalaxy

A simple GOG client for Linux
https://sharkwouter.github.io/minigalaxy/
GNU General Public License v3.0
1.1k stars 71 forks source link

Python error preventing game downloads #580

Closed fefniir closed 1 year ago

fefniir commented 1 year ago

OS: Manjaro

Minigalaxy: From: AUR Package: minigalaxy-git Ver: 1.2.5r1.g910e030-1

Issue: Click on download button does not result in game being downloaded. When started from the terminal the following error is produced when clicking on a games download button:

2023-09-06 03:19:07,681 - minigalaxy - ERROR - Encountered exception while making HTTP request. Request: https://api.gog.com/products/1508702879?locale=en-US&expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelog Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fd0bc142850>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.gog.com', port=443): Max retries exceeded with url: /products/1508702879?locale=en-US&expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelog (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd0bc142850>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/minigalaxy/api.py", line 286, in __request response = self.session.get(url, headers=headers, params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.gog.com', port=443): Max retries exceeded with url: /products/1508702879?locale=en-US&expand=downloads,expanded_dlcs,description,screenshots,videos,related_products,changelog (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd0bc142850>: Failed to establish a new connection: [Errno -2] Name or service not known')) Exception in thread Thread-49 (__download_game): Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 975, in run self._target(self._args, **self._kwargs) File "/usr/lib/python3.11/site-packages/minigalaxy/ui/gametile.py", line 238, in __download_game result, download_info = self.get_download_info() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/minigalaxy/ui/gametile.py", line 218, in get_download_info download_info = self.api.get_download_info(self.game, platform) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/minigalaxy/api.py", line 152, in get_download_info installers = response["downloads"]["installers"]


KeyError: 'downloads'

In particular the line:

<urllib3.connection.HTTPSConnection object at 0x7fd0bc142850>: Failed to establish a new connection: [Errno -2] Name or service not known')

Pops up repeatedly

Python packages that got pulled with the build are:

python 3.11.1-2
python-requests 2.28.2-4
python-gobject 3.44.1-4
fefniir commented 1 year ago

As of 09/07/2023 8:01am, after a rebuild of minigalaxy-git, downloading is working.

sharkwouter commented 1 year ago

Great! Glad to hear it. I was looking at this very confused