Python error at delineation step: 'utf-8' codec can't decode byte 0xcd in position 136: invalid continuation byte

103 views
Skip to first unread message

Валерій Осипов

unread,
Feb 2, 2023, 5:55:55 AM2/2/23
to QSWAT
Hello!

I have Python error during DEM processing ('Create streams'):
'utf-8' codec can't decode byte 0xcd in position 136: invalid continuation byte

The full message log is below.

I've just installed QGIS3.22.15-Białowieża and QSWAT3_9 (QSWAT version: 1.6.0). Before I used QSWAT+ on other computer.

              File "C:\Users/Валерий/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT\delineation.py", line 534, in runTauDEM1
              self.runTauDEM(None, False)
              File "C:\Users/Валерий/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT\delineation.py", line 664, in runTauDEM
              ok = TauDEMUtils.runD8FlowDir(felFile, sd8File, pFile, numProcesses, self._dlg.taudemOutput)
              File "C:\Users/Валерий/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT\TauDEMUtils.py", line 49, in runD8FlowDir
              return TauDEMUtils.run('D8FlowDir', [('-fel', felFile)], [], [('-sd8', sd8File), ('-p', pFile)], numProcesses, output, False)
              File "C:\Users/Валерий/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT\TauDEMUtils.py", line 223, in run
              proc = subprocess.run(commands,
              File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\subprocess.py", line 507, in run
              stdout, stderr = process.communicate(input, timeout=timeout)
              File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\subprocess.py", line 1121, in communicate
              stdout = self.stdout.read()
              File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\codecs.py", line 322, in decode
              (result, consumed) = self._buffer_decode(data, self.errors, final)
             UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 136: invalid continuation byte

I've tried to install QSWAT3_9 for everyone, but recieve the same error but different byte's position. Also, I tested Robit DEM but the result was the same.
              File "C:\PROGRA~1/QGIS32~1.15/apps/qgis-ltr/./python/plugins\QSWAT3_9\QSWAT\delineation.py", line 534, in runTauDEM1
              self.runTauDEM(None, False)
              File "C:\PROGRA~1/QGIS32~1.15/apps/qgis-ltr/./python/plugins\QSWAT3_9\QSWAT\delineation.py", line 680, in runTauDEM
              ok = TauDEMUtils.runAreaD8(pFile, ad8File, None, None, numProcesses, self._dlg.taudemOutput, mustRun=self.thresholdChanged)
              File "C:\PROGRA~1/QGIS32~1.15/apps/qgis-ltr/./python/plugins\QSWAT3_9\QSWAT\TauDEMUtils.py", line 65, in runAreaD8
              return TauDEMUtils.run('AreaD8', inFiles, check, [('-ad8', ad8File) ], numProcesses, output, mustRun)
              File "C:\PROGRA~1/QGIS32~1.15/apps/qgis-ltr/./python/plugins\QSWAT3_9\QSWAT\TauDEMUtils.py", line 223, in run
              proc = subprocess.run(commands,
              File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\subprocess.py", line 507, in run
              stdout, stderr = process.communicate(input, timeout=timeout)
              File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\subprocess.py", line 1121, in communicate
              stdout = self.stdout.read()
              File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\codecs.py", line 322, in decode
              (result, consumed) = self._buffer_decode(data, self.errors, final)
             UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 111: invalid continuation byte

Thanks, Valeriy

Gabriel Gancedo

unread,
Nov 28, 2023, 9:09:04 AM11/28/23
to QSWAT
Hello Valeriy,

I have found the same problem when trying to create streams from my dem file. Did you find an answer to your problem?

Thank you for your time!

Best wishes, Gabriel.
Reply all
Reply to author
Forward
0 new messages