[QGIS-Developer] Processing R scripts - TypeError: cannot concatenate 'str' and 'NoneType' objects
Giovanni Manghi
giovanni.manghi at gmail.com
Mon Jun 5 03:09:45 PDT 2017
Hi,
I confirm that in previous QGIS releases (2.14/2.16 for example) R
scripts were working as expected.
So I added
https://issues.qgis.org/issues/16618
to the list of regressions that must be fixed in time for the next LTR
https://docs.google.com/spreadsheets/d/1frZQU8bwGX499WMvtOc6GDIWqEuSv3QHz3zc90TS46Q/edit?usp=sharing
cheers!
-- G --
> Maybe a fix ...
>
> On Fri, Jun 2, 2017 at 8:31 PM, Anita Graser <anitagraser at gmx.at> wrote:
>
>> File "C:/OSGEO4~1/apps/qgis-ltr/./python/plugins\processing\algs\r\RAlgorithm.py",
>> line 404, in getExportCommands
>>
>> commands.append('cat("##' + out.name + '",file="' + outputDataFile +
>> '",sep="\n",append=TRUE)')
>>
>> TypeError: cannot concatenate 'str' and 'NoneType' objects
>>
>
> Not sure if it breaks anything else, but if I add
>
> elif isinstance(out, OutputHTML):
> pass
>
> before the offending
>
> elif out.name != RAlgorithm.R_OUTPUT_VALUES:
> commands.append('cat("##' + out.name + '",file="' +
> outputDataFile + '",sep="\n",append=TRUE)')
> commands.append('cat(' + out.name + ',file="' +
> outputDataFile + '",sep="\n",append=TRUE)')
>
> Then the HTML output is created and visible in the results viewer and there
> is no error.
>
> I'm not sure what the problematic lines were supposed to do anyway ...
More information about the QGIS-Developer
mailing list