Vanilla-OS / apx-gui

A frontend in GTK 4 and Libadwaita for Apx.
GNU General Public License v3.0
24 stars 4 forks source link

Requests Max retries exceeded errors in 1.0.2 #62

Open chewblacka opened 2 weeks ago

chewblacka commented 2 weeks ago

Hi I've just updated the nix package for apx-gui to 1.0.2 (had to add python requests as a new dependency). The project builds and seems to runs fine, but after a few seconds it spits out the below error. Is this a bug or am I missing a dependency? Many thanks!

ERROR:Vanilla::Async:Error while running async job: <function Monitor.read at 0x7fb1346f72e0>
Exception: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /events?  since=2024-07-09T16:35:01&stream=false (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb134703830>: Failed to establish a new connection: [Errno 111] Connection refused'))
File "/nix/store/h1mwd3ndnhly81gn0as7i2fic3vhiqi5-apx-gui-1.0.2/share/apx_gui/apx_gui/core/run_async.py", line 73, in __target
result = self.task_func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/h1mwd3ndnhly81gn0as7i2fic3vhiqi5-apx-gui-1.0.2/share/apx_gui/apx_gui/core/monitor.py", line 107, in read
response = session.get(
           ^^^^^^^^^^^^
File "/nix/store/f98z9h1gappf14p3id6kl21agfg9mfhp-python3-3.12.4-env/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/f98z9h1gappf14p3id6kl21agfg9mfhp-python3-3.12.4-env/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/f98z9h1gappf14p3id6kl21agfg9mfhp-python3-3.12.4-env/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/f98z9h1gappf14p3id6kl21agfg9mfhp-python3-3.12.4-env/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
Traceback (most recent call last):
File "/nix/store/h1mwd3ndnhly81gn0as7i2fic3vhiqi5-apx-gui-1.0.2/share/apx_gui/apx_gui/windows/main_window.py", line 70, in callback
for event in events:
TypeError: 'NoneType' object is not iterable
mirkobrombin commented 2 weeks ago

We uses the podman local server to check if the containers are running. Maybe podman is not installed or the server is not up?

We could consider to disable that feature if the server is not available.