Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup.py error on some platforms #4246

Merged

Conversation

cobaltchang
Copy link
Contributor

@cobaltchang cobaltchang commented Jul 5, 2016

Description

Please describe your pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. When linking to an issue, please use refs #... in the description of the pull request.

When compile djang REST framework with pypandoc using OpenWRT toolchain,
it raises the error:

warning: pypandoc module not found, could not convert Markdown to RST
Traceback (most recent call last):
  File "./setup.py", line 86, in <module>
    long_description=read_md('README.md'),
  File "./setup.py", line 19, in read_md
    return open(f, 'r').read()
  File "/GIT_POOL/OpenWRT/OpenWrt-SDK-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4874: ordinal not in range(128)

I specify encoding='utf-8' to resolve the building failure.

modified:   setup.py

cobaltchang added 2 commits Jul 5, 2016
it raises the error:

```
warning: pypandoc module not found, could not convert Markdown to RST
Traceback (most recent call last):
  File "./setup.py", line 86, in <module>
    long_description=read_md('README.md'),
  File "./setup.py", line 19, in read_md
    return open(f, 'r').read()
  File "/GIT_POOL/OpenWRT/OpenWrt-SDK-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4874: ordinal not in range(128)
```

I specify encoding='utf-8' to resolve the building failure.

	modified:   setup.py
@codecov-io
Copy link

codecov-io commented Jul 5, 2016

Current coverage is 91.19%

Merging #4246 into master will not change coverage

@@             master      #4246   diff @@
==========================================
  Files            52         52          
  Lines          5771       5771          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           5263       5263          
  Misses          508        508          
  Partials          0          0          

Powered by Codecov. Last updated by 6ff9840...173659f

@tomchristie tomchristie merged commit b04bd86 into encode:master Jul 5, 2016
2 checks passed
@tomchristie
Copy link
Member

tomchristie commented Jul 5, 2016

Thanks!

@tomchristie tomchristie changed the title Fix the error without specified encoding when compiling Fix setup.py error on some platforms Jul 5, 2016
@tomchristie tomchristie added this to the 3.4.0 Release milestone Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants