Bug report #14306

Downloaded models not shown in Toolbox + python error

Added by Paolo Cavallini over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Modeller
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22297

Description

Downloading models from within Processing does not work: the models are
downloaded and saved locally, but not displayed on the alg tree,
presumably because they are not valid, and should be updated.

Associated revisions

Revision 30a738f9
Added by Alexander Bruy over 4 years ago

[processing] improve handling of the obsolete models (fix #14306)

History

#1 Updated by Alexander Bruy over 4 years ago

  • Subject changed from Download models does not work to Downloaded models does not shown in Toolbox

If models downloaded, than this functionality works fine.

IMHO in case of 3rd party models/scripts we shpuld have same policy as with plugins. It is models/scripts authors responsibility to keep it updated and functional, not ours.

#2 Updated by Paolo Cavallini over 4 years ago

This makes sense. Previous versions allowed to see the models, that returned an error.
Probably the long term solution to this issue is allowing min/max version for the models, just like QGIS plugins.
In this way, only suitable models will be shown and downloaded.

#3 Updated by Paolo Cavallini over 4 years ago

  • Subject changed from Downloaded models does not shown in Toolbox to Downloaded models not shown in Toolbox

#4 Updated by Giovanni Manghi over 4 years ago

  • Subject changed from Downloaded models not shown in Toolbox to Downloaded models not shown in Toolbox + python error
  • Status changed from Open to Feedback

There is anyway something fishy in master:

the tool "get models from on line collection" allows right now to choose among 6 models. The last 4 are installed but do not show immediately, just after a restart. This is ok on 2.12

On the other hand the first two, contributed by JEANDENANS L., they install, do not show, but after a restart a python error comes up and Processing does not start.

The first problem seems a general one and should be fixed as a regression, the second one if caused by a not updated model then could be solved by removing the models from the repo.

Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis-dev/./python\\qgis\\utils.py", line 315, in startPlugin
plugins[packageName].initGui()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\ProcessingPlugin.py", line 57, in initGui
Processing.initialize()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\core\\Processing.py", line 148, in initialize
Processing.loadFromProviders()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\core\\Processing.py", line 165, in loadFromProviders
Processing.loadAlgorithms()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\core\\Processing.py", line 216, in loadAlgorithms
Processing.modeler.loadAlgorithms()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\core\\AlgorithmProvider.py", line 54, in loadAlgorithms
self._loadAlgorithms()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\modeler\\ModelerAlgorithmProvider.py", line 77, in _loadAlgorithms
self.loadFromFolder(folder)
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing\\modeler\\ModelerAlgorithmProvider.py", line 97, in loadFromFolder
self.tr('Could not load model %s\
%s', 'ModelerAlgorithmProvider') % (descriptionFile, e.msg))
TypeError: not all arguments converted during string formatting

#5 Updated by Alexander Bruy over 4 years ago

I can not confirm issue with models by JEANDENANS. They downloaded, not shown in Toolbox, but after restart I have no error. Tested under Linux with latest master and under Windows with yesterday OSGeo4W

#6 Updated by Alexander Bruy over 4 years ago

Refreshing of the Toolbox now fixed, can we close this?

#7 Updated by Alexander Bruy over 4 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF