Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running script from Script editor #26141

Closed
qgib opened this issue Feb 27, 2018 · 3 comments
Closed

Error running script from Script editor #26141

qgib opened this issue Feb 27, 2018 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Feb 27, 2018

Author Name: Albert van de Maat (Albert van de Maat)
Original Redmine Issue: 18250
Affected QGIS version: 3.0.0
Redmine category:processing/core


Running a Python script from the Script editor throws an error:
"No script found - Seems there is no valid script in the file".
See attached png.

In this little script i just print a string to the Python Console, like:
print ("hello")
The string is logged to the console, but after that this error occurs.

Additional info:
After saving the script to the default script folder, 'Scripts' is disappeared from the Processing Toolbox
Also when Qgis is restarted this script is not loaded in the Processing Toolbox


@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2018

Author Name: Salvatore Larosa (@slarosa)


Script framework has changed since 3.0. Now it uses the same syntax like algorithms.
Each script must be created subclassing the "@QgsProcessingAlgorithm@":http://python.qgis.org/api/core/Processing/QgsProcessingAlgorithm.html?highlight=qgsprocessi#module-QgsProcessingAlgorithm class.


  • status_id was changed from Open to Closed
  • category_id was changed from PyQGIS Console to Unknown

@qgib qgib closed this as completed Feb 27, 2018
@qgib
Copy link
Contributor Author

qgib commented Feb 27, 2018

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to invalid
  • category_id was changed from Unknown to Processing/Core

@qgib
Copy link
Contributor Author

qgib commented Mar 1, 2018

Author Name: Lance Evans (Lance Evans)


I'm also experiencing this issue. Whether I add a preexisting QgsProcessingAlgorithm class script or copying contents into a "New" script, nothing happens, no feedback, and no new script showing up in the Processing Toolbox. Also, Scripts icon disappears as Albert indicated.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant