Build problem of ujson 4.0.0 in Ubuntu arm64 Docker container
envgap__ultrajson__ultrajson-434
01 / FAILURE SIGNATURE
As reported upstream
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2116: ordinal not in range(128)
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
62b89200c69723bfe1ae3ff56c94a70c99459a9d- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
ultrajson/ultrajson #434 · read the original issue
Hello everyone!
I have a **problem** installing / building ujson in a ubuntu18.04 Docker container for arm64/aarch64.
This has started with the last change, adding the special characters to setup.py.
It seems that in setup.py the reading of README.rst has problems with the encoding.
The **error** I get is
```
Traceback (most recent call last):
File "setup.py", line 38, in <module>
long_description = f.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2116: ordinal not in range(128)
```
A possible **solution** is (not sure what is the best way) to change [Line 37 in setup.py](https://github.com/ultrajson/ultrajson/blob/62b89200c69723bfe1ae3ff56c94a70c99459a9d/setup.py#L37) to `with open("README.rst", "rt", encoding="utf-8") as f:`
To **reproduce** this on a x86 machine (with docker and qemu installed) build the following Dockerfile and start the container:
```Dockerfile
FROM ubuntu:18.04@sha256:c57d3145ffd3adb9e4dea2704c08d4d027dd57cb6e30d69dce6c1d14bd38fe5c as ujsontest
RUN apt-get update
RUN apt-get -y upgrade
RUN apt -y install git vim build-essential python3 python3-dev python3-pip
RUN git clone https://github.com/ultrajson/ultrajson.git
RUN pip3 install wheel
WORKDIR /ultrajson
RUN pip3 install --upgrade setuptools
ENTRYPOINT python3 setup.py bdist_wheel
```
Run:
```sh
docker build -t ujsonencodingerror -f Dockerfile .
docker run --rm ujsonencodingerror
```
**Other setups build / install without problems**. (i.e. Ubuntu 18.04 installed on Raspberry Pi 4 (aarch64) and Debian in a x86 VM).
I would appreciate if someone could look into this. If additional information is necessary, please contact me.
Thank!
Cheers,
David
_Originally posted by @DavidBuettner in https://github.com/ultrajson/ultrajson/pull/427#r502500815_04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]