thunder-guanaco / dgf

Webseite für die Disc Golf Friends
2 stars 0 forks source link

Kevin: ConnectionError while executing management command: dgf.management.commands.fetch_pdga_data #7274

Open manologg opened 2 months ago

manologg commented 2 months ago

ConnectionError

socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request(

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn)

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1060, in _validate_conn conn.connect()

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn()

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError(

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f6f2a525480>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/ubuntu/env/lib/python3.10/site-packages/requests/adapters.py", line 589, in send resp = conn.urlopen(

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 801, in urlopen retries = retries.increment(

File "/home/ubuntu/env/lib/python3.10/site-packages/urllib3/util/retry.py", line 594, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.pdga.com', port=443): Max retries exceeded with url: /services/json/event?tournament_id=42743&start_date=2024-08-16&end_date=2025-09-20&offset=0&limit=10 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6f2a525480>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/ubuntu/django_project/dgf/management/commands/fetch_pdga_data.py", line 20, in update_friend pdga.update_friend_tournaments(friend, pdga_api)

File "/home/ubuntu/django_project/dgf/pdga/main.py", line 14, in update_friend_tournaments update_tournament_results(pdga_api, friend, player_page_soup)

File "/home/ubuntu/django_project/dgf/pdga/results.py", line 50, in update_tournament_results add_tournament_results(pdga_api, friend, link)

File "/home/ubuntu/django_project/dgf/pdga/results.py", line 43, in add_tournament_results tournament = add_tournament(pdga_api, pdga_id=tournament_id)

File "/home/ubuntu/django_project/dgf/pdga/common.py", line 28, in add_tournament pdga_tournament = pdga_api.get_event(tournament_id=pdga_id)

File "/home/ubuntu/django_project/dgf/pdga/api.py", line 140, in get_event event = self.query_event(tournament_id=tournament_id)

File "/home/ubuntu/django_project/dgf/pdga/api.py", line 137, in query_event return self._query_pdga('event', query_parameters)

File "/home/ubuntu/django_project/dgf/pdga/api.py", line 160, in _query_pdga response = requests.get(f'{settings.PDGA_BASE_URL}/{url}?{query}',

File "/home/ubuntu/env/lib/python3.10/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, **kwargs)

File "/home/ubuntu/env/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs)

File "/home/ubuntu/env/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs)

File "/home/ubuntu/env/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs)

File "/home/ubuntu/env/lib/python3.10/site-packages/requests/adapters.py", line 622, in send raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.pdga.com', port=443): Max retries exceeded with url: /services/json/event?tournament_id=42743&start_date=2024-08-16&end_date=2025-09-20&offset=0&limit=10 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6f2a525480>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))