Bug report #16053

Numerous processing algs which export to file are broken

Added by Nyall Dawson almost 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23968

Description

A number of processing algs are broken on master. This seems to be any which use output.getTableWriter or the TableWriter class:

- Distance matrix
- Stats by Category
- Raster layer histogram

Error is:

Uncaught error while executing algorithm
Traceback (most recent call last):
File "/home/nyall/dev/build-QGIS/output/python/plugins/processing/core/GeoAlgorithm.py", line 213, in execute
self.processAlgorithm(progress)
File "/home/nyall/dev/build-QGIS/output/python/plugins/processing/algs/qgis/StatisticsByCategories.py", line 84, in processAlgorithm
writer = output.getTableWriter(fields)
File "/home/nyall/dev/build-QGIS/output/python/plugins/processing/core/outputs.py", line 295, in getTableWriter
return TableWriter(self.value, self.encoding, fields)
File "/home/nyall/dev/build-QGIS/output/python/plugins/processing/tools/vector.py", line 746, in init
self.writer.writerow(fields)
File "/home/nyall/dev/build-QGIS/output/python/plugins/processing/tools/vector.py", line 774, in writerow
data = data.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

Associated revisions

Revision c4cc9541
Added by Alexander Bruy almost 8 years ago

[processing] restore functionality of the TableWriter class (fix #16053)

History

#1 Updated by Alexander Bruy almost 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF