Skip to content

UnicodeDecodeError from setup.py with python3.6 and LANG=C #84

@ktns

Description

@ktns

Hi,

I've encountered an error while installing your package in a docker image.
It boils down like below.

%docker run --rm python:3.6 env LANG=C pip install --no-binary :all: uModBus==1.0.3
Collecting uModBus==1.0.3
  Downloading uModbus-1.0.3.tar.gz (19 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7mj5qq3n/uModBus/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7mj5qq3n/uModBus/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-7mj5qq3n/uModBus/pip-egg-info
         cwd: /tmp/pip-install-7mj5qq3n/uModBus/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-7mj5qq3n/uModBus/setup.py", line 12, in <module>
        long_description = open(os.path.join(cwd, 'README.rst'), 'r').read()
      File "/usr/local/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 0xce in position 547: ordinal not in range(128)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I think I can prepare a PR to fix this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions