Bug report #16618

Processing rscripts: cannot concatenate 'str' and 'NoneType' objects

Added by Alessandro Samuel-Rosa almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:High
Assignee:René-Luc ReLuc
Category:Processing/Core
Affected QGIS version:2.18.8 Regression?:Yes
Operating System:Ubuntu 16.04; Window 10 Easy fix?:Yes
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24518

Description

I have updated QGIS to the latest version 2.18.8 both in Ubuntu 16.04 and Windows 10.

When I try to run any rscrit from the processing toolbox I get the following error message in both OS:

'cannot concatenate 'str' and 'NoneType' objects'

Associated revisions

Revision 7a198dff
Added by René-Luc ReLuc almost 7 years ago

[BUGFIX][Processing][Rscript] Write to R_OUTPUT_VALUES file if saveOutputValues

Fixes #16618 Processing rscripts: cannot concatenate 'str' and 'NoneType' objects

Revision 3d9af5bb
Added by René-Luc ReLuc almost 7 years ago

[BUGFIX][Processing][Rscript] Write to R_OUTPUT_VALUES file if saveOutputValues

Fixes #16618 Processing rscripts: cannot concatenate 'str' and 'NoneType' objects

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Category changed from Python plugins to Processing/Core
  • Status changed from Open to Feedback
  • Priority changed from High to Normal

Tnis used to work in a previous QGIS version?

#2 Updated by Alessandro Samuel-Rosa almost 7 years ago

On Ubuntu, it was working on the immediately previous QGIS 2.18.7 version. On Windows, it was working on 2.16.3 (I do not use Windows regularly).

#3 Updated by Giovanni Manghi almost 7 years ago

  • Priority changed from Normal to High
  • Regression? changed from No to Yes
  • Assignee set to Victor Olaya
  • Status changed from Feedback to Open

#4 Updated by Anita Graser almost 7 years ago

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 ...

#5 Updated by René-Luc ReLuc almost 7 years ago

  • Assignee changed from Victor Olaya to René-Luc ReLuc

Hi Anita,

It's my fault, I have not tested with an OutputHTML.
I will fix it, but how ths OutputHTML is defined ?

#6 Updated by René-Luc ReLuc almost 7 years ago

  • Easy fix? changed from No to Yes

#7 Updated by René-Luc ReLuc almost 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF