Bug report #18250

Error running script from Script editor

Added by Albert van de Maat about 6 years ago. Updated about 6 years ago.

Affected QGIS version:3.0.0 Regression?:No
Operating System:Windows 10 64 bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:26141


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

Error_No_script_found.PNG (30 KB) Albert van de Maat, 2018-02-27 01:40 PM


#1 Updated by Salvatore Larosa about 6 years ago

  • Status changed from Open to Closed
  • Category changed from PyQGIS Console to Unknown

Script framework has changed since 3.0. Now it uses the same syntax like algorithms.
Each script must be created subclassing the QgsProcessingAlgorithm class.

#2 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to invalid
  • Category changed from Unknown to Processing/Core

#3 Updated by Lance Evans about 6 years ago

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.

Also available in: Atom PDF