I am writing a script for QGIS that will identify the perimeter of only external facing walls.
The script is probably a little long to post directly into this post, but it is accessible here.
The script works when I am in QGIS's script editor and hit run i.e. the dialog box comes up and all runs as expected.
However upon using the 'add script from file' button (Processing> Toolbox> Add script from file) I am greeted with the error:
The selected file does not contain a valid script
Unfortunately I can't seem to get any break down or tracestack of why this is the case. I've tried examining the GitHub page for the function responsible but am unable to uncover any answers.
1 Answer 1
## Iterate through each of the buildings
That should be a single comment sign (#), not a double one, otherwise, it tries to parse it as if it was a parameter, and it fails
Yyou do not need to add the script from file. Just save it to the scripts folder, and it will be automatically added to the toolbox
-
This was the correct answer. The issue was having a double hash (##) as one of my normal comments. The double hashes are reserved for input variable assignment by QGIS ProcessingJames Milner– James Milner2016年01月27日 09:19:20 +00:00Commented Jan 27, 2016 at 9:19