You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qgiscloud.qgiscloudapi.qgiscloudapi.BadRequestError
Traceback (most recent call last):
File "/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgiscloud/qgiscloudapi/qgiscloudapi.py", line 684, in request
response = urllib.request.urlopen(req).read()
File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
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 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgiscloud/qgiscloudplugindialog.py", line 334, in check_login
login_info = self.api.check_login(
File "/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgiscloud/qgiscloudapi/qgiscloudapi.py", line 161, in check_login
content = request.post(resource, data)
File "/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgiscloud/qgiscloudapi/qgiscloudapi.py", line 596, in post
return self.request(resource, method='POST', data=data)
File "/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgiscloud/qgiscloudapi/qgiscloudapi.py", line 698, in request
raise BadRequestError(msg)
qgiscloud.qgiscloudapi.qgiscloudapi.BadRequestError
Python-Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
QGIS-Version: 3.10.14-A Coruña A Coruña, exported
Python-Pfad:
/usr/share/qgis/python
/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python
/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python39.zip
/usr/lib/python3.9
/usr/lib/python3.9/lib-dynload
/home/tpo/.local/lib/python3.9/site-packages
/usr/local/lib/python3.9/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.9/dist-packages
/home/tpo/.local/share/QGIS/QGIS3/profiles/default/python
/home/tpo/src/_qgis/adventsfenster-breite
There are a few problems with this:
the reaction of the qgis-cloud-plugin is not really helpful. We're getting back a "HTTP Error 400: Bad Request" so the qgis-cloud-plugin could be guessing that the URL is probably wrong and tell the user so
the error message does not mention the URL that results in the 400 error. So the user can only guess at which point in the communication step resp. protocol between the qgis-cloud-plugin client and the QGIS Cloud server the error happened.
I notice that the urllib.error.HTTPError exception instance gets replaced by custom exceptions thereby loosing all context such as the URL that caused the error. Which means that the callsite, that called Request.request will be unable to use the original context to form an intelligent response to the problem (as described in the first point above) (or by just displaying the faulty URL). I don't understand why this repackaging with context loss is being done in the exception handling - it seems rather strange to me it is done that way.
This react
The text was updated successfully, but these errors were encountered:
When I enter a wrong Server URL in the plugin:
I get a traceback window with this:
There are a few problems with this:
qgis-cloud-plugin/qgiscloud/qgiscloudapi/qgiscloudapi.py
Line 655 in b3333d7
This react
The text was updated successfully, but these errors were encountered: