You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit baffled about the root cause, but I have simple reproduction steps and a simple fix.
The issue can be reproduced by running this Dockerfile:
FROM centos:7.5.1804
RUN yum update -y && yum install -y python3
RUN python3 -m pip install --upgrade pip
CMD ["python3", "-m", "pip", "install", "betterproto"]
like: docker run --rm -it $(docker build -q .)
Will produce output like:
Collecting betterproto
Downloading betterproto-1.2.3.tar.gz (24 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmptildjr2u
cwd: /tmp/pip-install-tgfsl0y5/betterproto
Complete output (20 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-eqgnnb9a/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 148, in get_requires_for_build_wheel
config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-eqgnnb9a/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 128, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-eqgnnb9a/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 250, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-eqgnnb9a/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 143, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 7, in <module>
long_description=open("README.md", "r").read(),
File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 11237: ordinal not in range(128)
The issue is that the setup.py reads the README, apparently in ascii mode instead of utf-8 even though it's python 3.6.8 (which doesn't behave this one on macOS for example), and seems to find some non-ascii characters. It's not obvious exactly what's wrong with the readme, but the setup.py if easily fixed by updating line 7 to to force utf-8 like:
I'm a bit baffled about the root cause, but I have simple reproduction steps and a simple fix.
The issue can be reproduced by running this Dockerfile:
like:
docker run --rm -it $(docker build -q .)
Will produce output like:
The issue is that the setup.py reads the README, apparently in ascii mode instead of utf-8 even though it's python 3.6.8 (which doesn't behave this one on macOS for example), and seems to find some non-ascii characters. It's not obvious exactly what's wrong with the readme, but the setup.py if easily fixed by updating line 7 to to force utf-8 like:
The text was updated successfully, but these errors were encountered: