Closed duncandewhurst closed 4 years ago
Did you do set PYTHONIOENCODING=utf-8
as instructed here? https://ocdskit.readthedocs.io/en/latest/cli.html
I see cp1252 in the backtrace, which is a Windows encoding which breaks lots of Python CLI tools.
The problem is basically that OCDS Kit is providing UTF-8 data, but Python knows that the shell's encoding is cp1252, so it tries to encoding the UTF-8 data as such, and it errors.
Ah, I missed that. Problem solved.
Noted whilst testing the OCDS Kit Learning Lab on Windows 10.
The
package-releases
command crashes with the following Traceback:I tried specifying the encoding of the source files (utf-8) but got the same error.
For reference I used the following commands:
and
with two files downloaded from the Afghanistan OCDS API: file 1, file 2