Arrow: setup.py needs to specify encoding when reading README.rst

Created on 4 Jun 2019  路  5Comments  路  Source: arrow-py/arrow

I've found another issue with the recent changes to setup.py (https://github.com/crsmithdev/arrow/commit/2e5031b473bcf10b99b9d7ff8a7e72499c412c07)

Depending on the current locale, installation fails when setup.py attempts to read README.rst

Collecting arrow<1,>=0 (from this-is-redacted==1.2.3->also-redacted==4.5.6)
  Downloading https://files.pythonhosted.org/packages/90/7f/7fd8accc23aa507d215b5f07b509661c31583010d8276ba844896ee1f44b/arrow-0.14.1.tar.gz (102kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-3mcnwe97/arrow/setup.py", line 7, in <module>
        readme = f.read()
      File "/apps/api/venv_py3/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 3701: ordinal not in range(128)

Also see:
https://github.com/crsmithdev/arrow/issues/202
https://github.com/crsmithdev/arrow/issues/208
https://github.com/crsmithdev/arrow/issues/224

bug

Most helpful comment

No problem @andrewmwilson thanks for bringing this up. Hah the seemingly innocuous change seemed to cause the most issues.

All 5 comments

Sorry to do this to you @jadchaar!

I will open a PR very shortly.

No problem @andrewmwilson thanks for bringing this up. Hah the seemingly innocuous change seemed to cause the most issues.

@andrewmwilson arrow 0.14.2 has been released to address this issue. Let us know if it fixes the issue and if you have anymore questions or concerns!

Thanks again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pganssle picture pganssle  路  5Comments

jadchaar picture jadchaar  路  7Comments

fbergero picture fbergero  路  4Comments

bollwyvl picture bollwyvl  路  6Comments

adam-rudd-myob picture adam-rudd-myob  路  6Comments