Bug report #17897

Get scripts from on-line scripts collection fetches outdated scripts

Added by Anita Graser about 6 years ago. Updated about 6 years ago.

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

Description

The scripts that are downloaded don't work. The error is:

This algorithm cannot be run :-(
This script has a syntax errors. Problem with line: ##output=output vector

History

#1 Updated by Anita Graser about 6 years ago

Similarly for models: "Get models from on-line scripts collection" seems to download something but no models appear in the toolbox. (No visible error message)

#2 Updated by Richard Duivenvoorde about 6 years ago

Hi Anita,

looking into debug:

At least the list of scripts is downloaded:

https://raw.githubusercontent.com/qgis/QGIS-Processing/master/scripts/list.txt

And if I select on script it is downloaded too:
src/core/qgsnetworkaccessmanager.cpp: 96: (queryProxy) [16ms] using fallback proxy for https://raw.githubusercontent.com/qgis/QGIS-Processing/master/scripts/realcentroid_algorithm.py
src/core/qgsnetworkaccessmanager.cpp: 223: (createRequest) [0ms] Created [reply:55d45919ee60]
src/core/qgsnetworkaccessmanager.cpp: 185: (createRequest) [190ms] Adding trusted CA certs to request
src/core/qgsnetworkaccessmanager.cpp: 96: (queryProxy) [3ms] using fallback proxy for https://raw.githubusercontent.com/qgis/QGIS-Processing/master/scripts/realcentroid_algorithm.py.help

But trying to run:

This script has a syntax errors. Problem with line: ##output=output vector

And then removing that line still not working:

Algorithm 'Real centroid' starting...
Input parameters: { 'poly' : '/home/richard/geodata/provincies.shp' }

Traceback (most recent call last): File "/home/richard/bin/qgis_all/master/debug/share/qgis/python/plugins/processing/script/ScriptAlgorithm.py", line 261, in processAlgorithm exec((self.cleaned_script), self.ns) File "", line 8, in ImportError: cannot import name 'VectorWriter'

Execution failed after 0.14 seconds

I think that maybe the interface for the scripts is changed, so the authors should either fix the scripts, OR we should remove them from the master branche of QGIS (they are working for 2.18 isn't it?)

#3 Updated by Anita Graser about 6 years ago

Yes, the scripts work in 2.18 but something has changed in master and I cannot find any documentation.

#4 Updated by Alexander Bruy about 6 years ago

There is nothing wring with Processing itself, it works. The problem is that scripts and models in the online repository were not updated to QGIS 3. That's why they are not listed in the Processing toolbox after downloading. Scripts/models authors should update their code to API changes similarly to the plugins.

#5 Updated by Anita Graser about 6 years ago

If the scripts were updated, then they would be broken in 2.18, right? Or is there some logic in place that fetches the correct version?

#6 Updated by Alexander Bruy about 6 years ago

As I can see there is no logic to handle multiple versions. And IMHO we should remove code for managing online repo from Processing completely in favour of Resource Sharing plugin.

#7 Updated by Anita Graser about 6 years ago

+1 for removing the "get from on-line scripts/models collection" code

#8 Updated by Alexander Bruy about 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

As discussed, this functionality was removed from master. Resource Sharing plugin should be used instead.

Also available in: Atom PDF