Bug report #12515
Missing connection error not handled properly when downloading models
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Victor Olaya | ||
Category: | Processing/Modeller | ||
Affected QGIS version: | 2.8.1 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20660 |
Description
If I try to download sample models from Processing when no connection is available, a raw error is displayed (see below). This should be handled, and the user should be presented with a "Broken connection" understandable error message.
Traceback (most recent call last): File "/home/paolo/.qgis2/python/plugins/processing/gui/ProcessingToolbox.py", line 219, in executeAlgorithm action.execute() File "/home/paolo/.qgis2/python/plugins/processing/gui/GetScriptsAndModels.py", line 77, in execute dlg = GetScriptsAndModelsDialog(GetScriptsAndModelsDialog.MODELS) File "/home/paolo/.qgis2/python/plugins/processing/gui/GetScriptsAndModels.py", line 124, in __init__ self.populateTree() File "/home/paolo/.qgis2/python/plugins/processing/gui/GetScriptsAndModels.py", line 140, in populateTree resources = readUrl(self.urlBase + 'list.txt').splitlines() File "/home/paolo/.qgis2/python/plugins/processing/gui/GetScriptsAndModels.py", line 90, in readUrl return urllib2.urlopen(url).read() File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open context=self._context) File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) URLError:
Associated revisions
[processing] better error capturing when connection to models repo fails
fixes #12515
History
#1 Updated by Jürgen Fischer over 9 years ago
- Subject changed from MIssing connection error not handled properly when downloading models to Missing connection error not handled properly when downloading models
#2 Updated by Victor Olaya over 9 years ago
- Status changed from Open to Closed
Fixed in changeset 38d598008ec9cdb12949f78daac05c80db1ecc05.