[Qgis-user] Using the ##passfilename tag for R script in Processing Toolbox

Victor Olaya volayaf at gmail.com
Tue Feb 11 13:41:50 PST 2014


Hi Ned

That looks like a bug when parsing the script code. I will check to see
what I can do.

Are you using the latest version of Processing, or the one that comes with
QGIS 2.0.1?


2014-02-10 23:03 GMT+01:00 Ned Horning <horning at amnh.org>:

> Hi -
>
> I am trying to learn to write R scripts using the Processing Toolbox. I
> have a random forest image classification script that works in the
> processing toolkit but I'd like to modify it to do more complex tasks. I
> think I need to use the ##passfilename tag but every time I add that to a
> script I get an error that I pasted below. I tried several different
> scripts and every time I add the ##passfilename tag I get the same error.
> Does the ##passfilename tag  need other parameters? If anyone knows what
> the problem might be or has pointers about how I can find the problem
> please let me know?
>
> This R scripting capability has a lot of potential and I'd like to write a
> guide on how to use it but I still have a lot to learn myself.
>
> All the best,
>
> Ned
>
>
> I'm running QGIS 2.0.1 on Ubuntu 12.04. This is the error message:
> --
> An error has occured while executing Python code:
>
> Traceback (most recent call last):
>   File "/usr/share/qgis/python/plugins/processing/r/EditRScriptDialog.py",
> line 95, in runAlgorithm
>     alg = RAlgorithm(None, unicode(self.text.text()))
>   File "/usr/share/qgis/python/plugins/processing/r/RAlgorithm.py", line
> 71, in __init__
>     self.defineCharacteristicsFromScript()
>   File "/usr/share/qgis/python/plugins/processing/r/RAlgorithm.py", line
> 82, in defineCharacteristicsFromScript
>     self.parseDescription(iter(lines))
>   File "/usr/share/qgis/python/plugins/processing/r/RAlgorithm.py", line
> 108, in parseDescription
>     raise WrongScriptException("Could not load R script:" +
> self.descriptionFile + ".\n Problem with line \"" + line + "\"")
> TypeError: cannot concatenate 'str' and 'NoneType' objects
>
> Python version:
> 2.7.3 (default, Sep 26 2013, 20:13:52)
> [GCC 4.6.3]
>
>
> QGIS version:
> 2.0.1-Dufour Dufour, exported
>
> Python path: ['/usr/share/qgis/python/plugins/processing',
> '/usr/share/qgis/python', '/home/nedhorning/.qgis2/python',
> '/home/nedhorning/.qgis2/python/plugins', '/usr/share/qgis/python/plugins',
> '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',
> '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',
> '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL',
> '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0',
> '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
> '/usr/lib/python2.7/dist-packages/ubuntuone-client',
> '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
> '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
> '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode',
> '/usr/share/qgis/python/plugins/fTools/tools']
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140211/fb876621/attachment.html>


More information about the Qgis-user mailing list