Skip to content
New issue

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

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

Already on GitHub? # to your account

pip install error on Windows: UnicodeDecodeError: #38

Closed
marco-manza opened this issue Jan 11, 2016 · 2 comments
Closed

pip install error on Windows: UnicodeDecodeError: #38

marco-manza opened this issue Jan 11, 2016 · 2 comments

Comments

@marco-manza
Copy link

pip install android-resource-remover

Collecting android-resource-remover
Using cached android-resource-remover-0.1.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 20, in
File "C:\Users\asm\AppData\Local\Temp\pip-build-oa9d_rfx\android-resource-remover\setup.py", line 15, in
long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))),
File "C:\Users\asm\AppData\Local\Temp\pip-build-oa9d_rfx\android-resource-remover\setup.py", line 9, in read
return open(os.path.join(os.path.dirname(file), f)).read().strip()
File "c:\software\python 3.5.1\lib\encodings\cp1250.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x83 in position 3075: character maps to

----------------------------------------
@xixigeek
Copy link

I get the same errors.So I fix the line 9 in setup.py like this
"return open(os.path.join(os.path.dirname(file), f),encoding='utf-8').read().strip()".
Then it works.
When we create a file in window, it's encode will use gbk instead of utf-8.If we want utf-8,we have to declare it before open the file.

@ca77y
Copy link
Contributor

ca77y commented Jan 19, 2016

thanks for reporting. this will be handled in #33

@ca77y ca77y closed this as completed Jan 19, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants