2

I am trying to do use the GRASS command r.carve but when I execute the algorithm it returns the following series of errors. I have run processes in the same way previously but I have no idea why it's stopped working.

I have reinstalled both the LTR version and version 3.20 of QGIS to no avail.

I have removed characters ó and í from the name of the waterway I want to carve from my DEM. As far as I can tell there is no degree symbol (i.e. \xb0) in either the DEM or the attribute table of the waterway.

File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 423, in processAlgorithm
getattr(self, fullName)(parameters, context, feedback)
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 480, in processInputs
self.loadRasterLayerFromParameter(
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 731, in loadRasterLayerFromParameter
self.loadRasterLayer(name, layer, external, band)
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 746, in loadRasterLayer
self.setSessionProjectionFromLayer(layer)
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 1044, in setSessionProjectionFromLayer
self.setSessionProjection(layer.crs())
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 1051, in setSessionProjection
file_name = Grass7Utils.exportCrsWktToFile(crs)
File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Utils.py", line 95, in exportCrsWktToFile
f.write(wkt)
UnicodeEncodeError: 'ascii' codec can't encode character '\xb0' in position 896: ordinal not in range(128) 
1
  • I seem to have overcome these errors by changing how I projected the clipped DEM to the local mercator. However, the r.carve function now produces a file that is bound by maximum and negative value that is of the order 10^38... I am using a dissolved vector that is continuous and has no gaps.
    – MatthewPB
    Jul 24 '21 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.