qgis-plugin
qgis-plugin copied to clipboard
Downloading removed project cause unhandled expection
Scenario:
- create and mergin project on mergin
- refresh QGIS plugin, so you can see it
- remove the mergin project on mergin web app
- in QGIS plugin, try to download the project
You get unhandled exception
Traceback (most recent call last):
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/mergin/client.py", line 192, in _do_request
return self.opener.open(request)
File "/usr/lib/python3.10/urllib/request.py", line 525, in open
response = meth(req, response)
File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
response = self.parent.error(
File "/usr/lib/python3.10/urllib/request.py", line 563, in error
return self._call_chain(*args)
File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: NOT FOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/sync_dialog.py", line 108, in download_start_internal
self.job = download_project_async(self.mergin_client, self.project_name, self.target_dir)
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/mergin/client_pull.py", line 127, in download_project_async
latest_proj_info = mc.project_info(project_path)
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/mergin/client.py", line 488, in project_info
resp = self.get("/v1/project/{}".format(project_path), params)
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/mergin/client.py", line 207, in get
return self._do_request(request)
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/mergin/client.py", line 181, in wrapper
return f(self, *args)
File "/home/jozef/.local/share/QGIS/QGIS3/profiles/scaling/python/plugins/Mergin/mergin/client.py", line 196, in _do_request
raise ClientError(info.get("detail"))
Mergin.mergin.common.ClientError: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.