syncthing-gtk
syncthing-gtk copied to clipboard
Crashing with KeyError in daemon.py _syncthing_cb_connections when starting daemon
Running syncthing-gtk 0.9.4.4+ds+git20201209+c46fbd8-1 on Ubuntu 21.10, syncthing-gtk crashes after starting the daemon from the app. There are two potential KeyError being thrown in line 499 and following as "paused" and "connected" might not yet be present in cons[id]. Their presence should be checked before testing their values.
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 1166, in _response self._callback(rdata, *self._callback_data) File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 499, in _syncthing_cb_connections if cons[id]["paused"]: KeyError: 'paused'
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 1166, in _response self._callback(rdata, *self._callback_data) File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 505, in _syncthing_cb_connections if cons[id]["connected"]: KeyError: 'connected'
line 499: if cons[id]["paused"]: ==> if "paused" in cons[id] and cons[id]["paused"]: line 505: if cons[id]["connected"]: ==> if "connected" in cons[id] and cons[id]["connected"]:
Same on Ubuntu Mate 22.04.
same on Xubuntu 22.04.
Experiencing this bug. Any idea how to resolve/workaround?
Project has moved to a more generic https://github.com/syncthing-gtk/syncthing-gtk/. A new tag (0.9.4.5) has been made but problem probably still exists (lines have moved to 534 but the test is still not protected against absence of "paused" or "connected" in cons[id].