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

UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 2812 #143

Open
liuweizzuie opened this issue Aug 2, 2017 · 3 comments
Labels

Comments

@liuweizzuie
Copy link

liuweizzuie commented Aug 2, 2017

here is an error of Unicode Issue:

C:\Users\ms>pip install expan
Collecting expan
  Downloading expan-0.6.0.tar.gz (70kB)
    100% |████████████████████████████████| 71kB 146kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ms\AppData\Local\Temp\pip-build-v8f3gpor\expan\setup.py", line 15, in <module>
        readme = readme_file.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 2812: illegal multibyte sequence

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ms\AppData\Local\Temp\pip-build-v8f3gpor\expan\

python environment:

>python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
@liuweizzuie liuweizzuie changed the title UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 2812 UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 2812 #BUG Aug 2, 2017
@liuweizzuie liuweizzuie changed the title UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 2812 #BUG UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 2812 Aug 2, 2017
@shansfolder
Copy link
Contributor

Hi @liuweizzuie, I did a quick search, this seems to happen with Windows with default Chinese encoding with Python3. See a same discussion here: sshwsfc/xadmin#330.

If you have some time, it would be great that you can open a Pull Request to branch dev that fixes it. Otherwise, we will plan it maybe in later days.

@shansfolder shansfolder added the bug label Aug 9, 2017
@CHI-MING-LEE
Copy link

CHI-MING-LEE commented Jan 22, 2019

Hi,
I found a solution that worked for me:

  1. Download the .tar.gz file from PyPI
  2. Download 7z unzip tools
  3. Open tar.gz file with 7z tool and edit the line open("ReadMe.rst") before readme = readme_file.read() as open("ReadMe.rst", encoding="UTF-8")
  4. Save the change
  5. Go into dos and execute pip install xxx.tar.gz <- the file you just modified

Hopefully you get your problem solved!
Ross

@shansfolder
Copy link
Contributor

@CHI-MING-LEE thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants