qgis-plugin
qgis-plugin copied to clipboard
Starting qgis stalls if server is not responsive
Starting QGIS was stuck while loading Mergin plugin.
Sending a ctrl+c returns:
Couldn't load plugin 'Mergin' due to an error when calling its initGui() method
KeyboardInterrupt
Traceback (most recent call last):
File "/home/uclaros/dev/cpp/QGIS/build-master-debug/output/python/qgis/utils.py", line 448, in startPlugin
plugins[packageName].initGui()
File "/home/uclaros/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/plugin.py", line 102, in initGui
self.create_manager()
File "/home/uclaros/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/plugin.py", line 194, in create_manager
self.mc = create_mergin_client()
File "/home/uclaros/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/utils.py", line 230, in create_mergin_client
mc = MerginClient(url, None, username, password, get_plugin_version(), proxy_config)
File "/home/uclaros/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 127, in __init__
self.login(login, password)
File "/home/uclaros/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 282, in login
resp = self.opener.open(request)
File "/usr/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/usr/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/lib/python3.9/urllib/request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.9/urllib/request.py", line 1350, in do_open
r = h.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1377, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 320, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.9/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
KeyboardInterrupt
Maybe the login process should be deferred until the user explicitly uses the plugin, so that we don't block qgis startup?