manuelaguadomtz / pythreshold

PyThreshold is a python package featuring Numpy/Scipy implementations of state-of-the-art image thresholding algorithms.
MIT License
58 stars 17 forks source link

UnicodeDecodeError: 'cp949' #6

Open JadeKim042386 opened 2 years ago

JadeKim042386 commented 2 years ago

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: https://github.com/manuelaguadomtz/pythreshold/blob/135e42fb4be1ff4d4c52ea05daca84be1acaa0fc/setup.py#L5-L7

After:

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

WDYK?