'utf-8' codec can't decode byte 0xd5 in position 71

InVEST-natcap.invest.sdr.sdr-log-2023-03-06–17_30_19.txt (10.0 KB)

I have encountered the above problem when running the InVEST model and I don’t know how to fix it.

Welcome to the forums @jujeonghoo and thanks for reporting this!

This error you’re experiencing has been very difficult for us to reproduce, and so I would very much like your help with debugging this. I have created a development build (download link below) that will produce a lot more debugging information. Could you do the following to try this out?

  1. Download and run this development build of InVEST: https://storage.googleapis.com/natcap-dev-build-artifacts/invest/phargogh/3.12.1.post14%2Bg725c2c5b5/workbench/invest_3.12.1.post14%2Bg725c2c5b5_workbench_win32_x64.exe

  2. Once the development build has installed and launched, configure the logging to have a level of debug. You can do this with the following steps:

    a. Click the gear icon to open the options dialog:

    b. Then, set the logging level to DEBUG. You can leave all other settings alone. Once you have done this, click the X in the upper-right corner to save the options.

Then, run the model again on the sample data and please upload the logfile. I expect there to be a LOT more logging.

Thanks in advance for your help!
James

1 Like

Thank you very much for your reply!
I use InVEST model in China. It may be that the Unicode programming language of my computer is Chinese, so this error appears. Now, I checked the “Global language support with Unicode UTF-8” option, and the problem is solved.
This question may help researchers using the InVEST model in China.
Thanks,
Jujeonghoo

Where do you see this option? Knowing this will help other researchers in the future.

Thanks,
James

windows setting —time and language — language — Management language Settings — Management — Change the system locale ---- Check the options in beta version.
The above is based on windows 10 in China, and I’m not sure if other computers are in that order.
Thanks,
Jujeonghoo

1 Like

This is very helpful, thank you!

@jujeonghoo , when you run this small bit of python code, what is the output?

python -c "import sys; print(sys.getfilesystemencoding())"

If you UNcheck the “Beta: use Unicode UTF-8 support” checkbox, what is shown?

If you can send me this, I think we may be able to fix this for all users of InVEST in any country.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.