MathieuChailloux / BioDispersal

QGIS plugin to compute ecolgical continuities
GNU General Public License v3.0
7 stars 1 forks source link

Dispersion step crash with UnicodeDecodeError #7

Open MathieuChailloux opened 4 years ago

MathieuChailloux commented 4 years ago

Log example

[2020-02-19 12:06:29.562189] [info] Calling processing algorithm 'gdal:rastercalculator'
[2020-02-19 12:06:29.576152] [info] GDAL command:
[2020-02-19 12:06:29.577149] [info] GDAL command output:
[2020-02-19 12:06:29.627016] [warn] Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.10/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 137, in processAlgorithm GdalUtils.runGdal(commands, feedback) File "C:/PROGRA~1/QGIS3~1.10/apps/qgis/./python/plugins\processing\algs\gdal\GdalUtils.py", line 106, in runGdal for line in proc.stdout: File "C:\PROGRA~1\QGIS3~1.10\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 0x82 in position 87: invalid start byte 
[2020-02-19 12:06:29.628013] [warn] Il y a eu des erreurs lors de l’exécution de l’algorithme.
[2020-02-19 12:06:29.628013] [warn] Failed to call rastercalculator : Il y a eu des erreurs lors de l’exécution de l’algorithme.
[2020-02-19 12:06:29.630008] [Unexpected error] : Il y a eu des erreurs lors de l’exécution de l’algorithme.

Issue happens when calling gdal:rastercalculator on Windows.

If possible, try to launch QGIS with GDAL version 2.X (and not 3.X).

Follow QGIS issue 31023 https://github.com/qgis/QGIS/issues/31023

jeremybachmann commented 3 years ago

Hi, I have quite the same issue. Everything's fine for steps 1-5 but steps 6 or 7 return this error : [info] GDAL command: [info] GDAL command output: [internal error] Traceback (most recent call last): File "C:/Program Files/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 133, in processAlgorithm GdalUtils.runGdal(commands, feedback) File "C:/Program Files/QGIS 3.4/apps/qgis-ltr/./python/plugins\processing\algs\gdal\GdalUtils.py", line 110, in runGdal for line in proc.stdout: File "C:\Program Files\QGIS 3.4\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 0xe9 in position 1793: invalid continuation byte [internal error] Il y a eu des erreurs lors de l’exécution de l’algorithme. [warn] Failed to call rastercalculator : Il y a eu des erreurs lors de l’exécution de l’algorithme. [2021-03-04 11:06:12.095323] I use QGIS 3.4.5 and GRASS 7.6.0, GDAL 3.1.9 It is an error in GDAL rastercalculator. I tried it separately and get the same issue. I hope a Gdal update will solve this

MathieuChailloux commented 3 years ago

Hi Jeremy,

The only solution for this issue has been to re-install QGIS (LTR version), is it an option for you ?

Regards, Mathieu

jeremybachmann commented 3 years ago

I installed QGIS 3.10.6 with GDAL 3.0.4 and it works. Thanks.