[Qgis-user] scripting with toolbox, output to file
"Prof. Dr. Jörg Höttges"
hoettges at fh-aachen.de
Wed Feb 4 13:56:03 PST 2015
Hello,
there seems to be a problem with "Creating scripts and running them from the toolbox": Output into a file didn't work:
the tag "output file" produces an error and the Python script doesn't load.
Is it a bug?
Jörg Höttges
test example:
##file_to_write_ascii=output file
with open(file_to_write_ascii ,'w') as fw:
fw.write("hello\n")
Python-Error:
Traceback (most recent call last):
File "C:/Program Files/QGISBR~1/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 214, in
executeAlgorithm
action.execute()
File "C:/Program Files/QGISBR~1/apps/qgis/./python/plugins\processing\script\AddScriptFromFileAction.py", line 50, in
execute
script = ScriptAlgorithm(filename)
File "C:/Program Files/QGISBR~1/apps/qgis/./python/plugins\processing\script\ScriptAlgorithm.py", line 75, in __init__
self.defineCharacteristicsFromFile()
File "C:/Program Files/QGISBR~1/apps/qgis/./python/plugins\processing\script\ScriptAlgorithm.py", line 100, in
defineCharacteristicsFromFile
'Problem with line: %d', 'ScriptAlgorithm') % (self.descriptionFile, line))
TypeError: %d format: a number is required, not str
FH Aachen
Prof. Dr.-Ing. Jörg Höttges
Fachbereich 2 - Bauingenieurwesen
Wasserwirtschaft und Bauinformatik
FH Aachen
University of Applied Sciences
Bayernallee 9
52066 Aachen | Germany
T +49 (0)241 6009-51176
F +49 (0)241 6009-51206
http://www.fh-aachen.de/hoettges/
hoettges at fh-aachen.de <mailto:hoettges at fh-aachen.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150204/2675c8b3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gjhedgaj.png
Type: image/png
Size: 839 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150204/2675c8b3/attachment.png>
More information about the Qgis-user
mailing list