Skip to content

UnicodeDecodeError: 'cp949' #6

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

Open
JadeKim042386 opened this issue Aug 28, 2022 · 0 comments
Open

UnicodeDecodeError: 'cp949' #6

JadeKim042386 opened this issue Aug 28, 2022 · 0 comments

Comments

@JadeKim042386
Copy link

JadeKim042386 commented Aug 28, 2022

I got error like following when pip install

Collecting pythreshold
  Using cached pythreshold-0.3.1.tar.gz (13 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\InternalShare\AppData\Local\Temp\pip-install-2ivdynn7\pythreshold_bc385847da254a4e8f52615ddaeabf31\setup.py", line 7, in <module>
          readme = f.read()
      UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 1329: illegal multibyte sequence
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

my system spec: Window11, python3.8.0

so i revised "setup.py" as following and it worked!!

Before:

pythreshold/setup.py

Lines 5 to 7 in 135e42f

# Get the long description from the README file
with open('README.md') as f:
readme = f.read()

After:

with open('README.md', encoding='utf-8') as f:
    readme = f.read()

WDYK?

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

No branches or pull requests

1 participant