I try running the v.clean tool using QGIS 3.4. As input I use a vector line layer (I checked the validity and everything is fine), but running the algorithm I get the following error:

Traceback (most recent call last):
File "D:/Programme/OSGeo4W/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 415, in processAlgorithm
Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands)
File "D:/Programme/OSGeo4W/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 372, in executeGrass
for line in iter(proc.stdout.readline, ''):
File "D:\Programme\OSGeo4W\apps\Python37\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 81: invalid start byte

Execution failed after 0.50 seconds

Since it is says it is a decoding error I checked the encoding and it is encoded in UTF-8.

Does anybody know how to solve the error?

  • You are probably using some special "Buchstaben". Try to play around with encoding of your vector line layer (e.g. using ISO 8859-1, ISO 8859-15, Windows 1250). However, the UTF-8 should work fine. Moreover, I would like you to describe a way how the original vector line layer was achieved? I assume that the issue is about the original vector line layer encoding. – Taras Nov 13 '18 at 13:06
  • I tried different layers from different sources now (even a new line layer I just created) and on use with v.clean I get the exact same error on every layer. I also tried different encodings for the layers and no matter which encoding I use, I get the same error. So I assume the problem does not come from the layers, but from QGIS itself. – gHupf Nov 13 '18 at 15:07
  • I tried by myself and also almost the same error UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2: character maps to Execution failed after 0.30 seconds – Taras Nov 13 '18 at 15:21
  • 1
    I tried in QGIS 2.18 and everything works fine. So it seems to be an error of 3.4. I don't know about other 3.x versions. – gHupf Nov 13 '18 at 16:50

QGIS version 3.4.2:

The bug is fixed in version 3.4.2 and everything works without error messages.

Note: This only works since QGIS version 3.4.2, if you use a previous version of 3.x please update QGIS or check a possible workaround I mentioned below.

Below 3.4.2:

In versions 3.x the error is a known QGIS bug and is triggered by regional language settings on Windows.

A current workaround is to switch the Windows system language to English (US) and the error will disappear.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.