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

pip install UnicodeDecodeError #55

Closed
joonas-yoon opened this issue May 29, 2022 · 0 comments · Fixed by #56
Closed

pip install UnicodeDecodeError #55

joonas-yoon opened this issue May 29, 2022 · 0 comments · Fixed by #56
Assignees
Labels
bug Something isn't working topic: build Related to project build
Milestone

Comments

@joonas-yoon
Copy link
Contributor

Bug description

When try to install package from repository, failed to read a file while installing with pip install -e .

In my guess, error has on following lines:

with open(cwd.joinpath('torchscan', 'version.py'), 'w') as f:
    f.write(f"__version__ = '{version}'\n")

with open('README.md', 'r') as f:
    readme = f.read()

The default UTF-8 encoding of Python 3 is belong users system, and in windows, it can not be always 'utf-8' encoding.

Code snippet to reproduce the bug

setup.py from this repository

Error traceback

$ pip install -e .
Obtaining file:///C:/Users/joona/Documents/2022/GAN/torch-scan
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 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\joona\Documents\2022\GAN\torch-scan\setup.py", line 38, in <module>
          readme = f.read()
      UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 1797: illegal multibyte sequence
      Building wheel torchscan-0.1.2.dev0+4d4fcbf
      [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.

Environment

TorchScan version: 0.1.2.dev0+4d4fcbf
PyTorch version: 1.11.0+cpu

OS: Microsoft Windows 10 Pro

Python version: 3.8.3
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

@joonas-yoon joonas-yoon added the bug Something isn't working label May 29, 2022
@frgfm frgfm added the topic: build Related to project build label May 29, 2022
@frgfm frgfm added this to the 0.1.2 milestone May 29, 2022
@frgfm frgfm linked a pull request May 29, 2022 that will close this issue
4 tasks
@frgfm frgfm closed this as completed in #56 May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic: build Related to project build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants