[Qgis-user] UnicodeDecodeError when running r.watershed

Tetsuro Kikuchi tekikuchi at affrc.go.jp
Sun Feb 26 18:08:27 PST 2023


Dear sirs,


I have encountered the following problem (UnicodeDecodeError) when I run 
the 'r.watershed', one of the GRASS GIS tools, on QGIS. Could you tell 
me how to solve this problem? The operating system, version of QGIS, and 
error log are as follows:

OS: Windows 10 Pro, 64 bit
QGIS version: 3.22.16

Error log:
QGIS version: 3.22.16-Białowieża
QGIS code revision: 6f08e4d7
Qt version: 5.15.3
Pythonバージョン: 3.9.5
GDAL version: 3.6.2
GEOS version: 3.11.1-CAPI-1.17.1
PROJ version: Rel. 9.1.1, December 1st, 2022
PDAL version: 2.4.3 (git-version: f8d673)
アルゴリズムの開始時刻: 2023-02-27T09:06:36
アルゴリズム 'r.watershed' を開始しています...
入力パラメータ:
{ '-4' : False, '-a' : False, '-b' : False, '-m' : False, '-s' : False, 
'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 
'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 
'accumulation' : 'TEMPORARY_OUTPUT', 'basin' : 'TEMPORARY_OUTPUT', 
'blocking' : None, 'convergence' : 5, 'depression' : None, 
'disturbed_land' : None, 'drainage' : 'TEMPORARY_OUTPUT', 'elevation' : 
'C:/Users/Kikuchi/Desktop/gis_data/madagascar/S16_17E46_47_DSM_utm38s_clip.tif', 
'flow' : None, 'half_basin' : 'TEMPORARY_OUTPUT', 'length_slope' : 
'TEMPORARY_OUTPUT', 'max_slope_length' : None, 'memory' : 300, 
'slope_steepness' : 'TEMPORARY_OUTPUT', 'spi' : 'TEMPORARY_OUTPUT', 
'stream' : 'TEMPORARY_OUTPUT', 'tci' : 'TEMPORARY_OUTPUT', 'threshold' : 
10000 }

g.proj -c 
wkt="C:/Users/Kikuchi/AppData/Local/Temp/processing_hvrJyK/4bf2cda4ce2248719eb1e3e932adc246/crs.prj"
r.in.gdal 
input="C:\Users\Kikuchi\Desktop\gis_data\madagascar\S16_17E46_47_DSM_utm38s_clip.tif" 
band=1 output="rast_63fbf40c542692" --overwrite -o
g.region n=8264851.5257102605 s=8144507.781290247 e=766109.6288817181 
w=624443.3562344841 res=30.244720889674216
r.watershed elevation=rast_63fbf40c542692 threshold=10000 convergence=5 
memory=300 accumulation=accumulationea0120119c6a4a15babab8619b5f1b43 
drainage=drainageea0120119c6a4a15babab8619b5f1b43 
basin=basinea0120119c6a4a15babab8619b5f1b43 
stream=streamea0120119c6a4a15babab8619b5f1b43 
half_basin=half_basinea0120119c6a4a15babab8619b5f1b43 
length_slope=length_slopeea0120119c6a4a15babab8619b5f1b43 
slope_steepness=slope_steepnessea0120119c6a4a15babab8619b5f1b43 
tci=tciea0120119c6a4a15babab8619b5f1b43 
spi=spiea0120119c6a4a15babab8619b5f1b43 --overwrite
g.region raster=accumulationea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="accumulationea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\e2342197a83f4befad482d82779a2866\accumulation.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=drainageea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="drainageea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\7a8a7a9b65a24db8b04979b62f45643e\drainage.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=basinea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="basinea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\25cff09ed7f3490c9c3f7f08e5a444cd\basin.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=streamea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="streamea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\3620119ea0f64876a44c42944cce9a50\stream.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=half_basinea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="half_basinea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\8f3d244cab70412596bd62ff24741d0e\half_basin.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=length_slopeea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="length_slopeea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\50f5002de0e64573935eef3796e38677\length_slope.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=slope_steepnessea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="slope_steepnessea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\69db3625d3ab4b1f8a84155a1a9c3eff\slope_steepness.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=tciea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="tciea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\e59f8a76ea104a2c996f012eeb36f980\tci.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
g.region raster=spiea0120119c6a4a15babab8619b5f1b43
r.out.gdal -t -m input="spiea0120119c6a4a15babab8619b5f1b43" 
output="C:\Users\Kikuchi\AppData\Local\Temp\processing_hvrJyK\b08c28bfb35f42f1aacf6eace36d48f5\spi.tif" 
format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Starting GRASS GIS...
警告: マップセットの平行ロックはウィンドウズではサポートされていません。
Traceback (most recent call last):
File 
"C:\PROGRA~1/QGIS32~1.16/apps/qgis-ltr/./python/plugins\grassprovider\Grass7Algorithm.py", 
line 433, in processAlgorithm
Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands)
File 
"C:\PROGRA~1/QGIS32~1.16/apps/qgis-ltr/./python/plugins\grassprovider\Grass7Utils.py", 
line 397, in executeGrass
for line in iter(proc.stdout.readline, ''):
UnicodeDecodeError: 'cp932' codec can't decode byte 0x84 in position 35: 
illegal multibyte sequence

Execution failed after 1.25 秒(seconds)


Kind regards,

Tetsuro


More information about the QGIS-User mailing list