asweigart / asweigart/PyGetWindow

Cannot install the package by pip due to some encoding error

Open
#2 10 comments 5 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
422
Forks
73
PR merge metrics
No merged PRs in 30d

Description

When I try to install the package via pip command, it generates the following error message:

Collecting pygetwindow (from pyautogui)
Downloading https://files.pythonhosted.org/packages/f1/54/740939161eb3471e8f775ce9b0fcac0e54c36bf63501e51f2cd7158f587d/PyGetWindow-0.0.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\******\AppData\Local\Temp\pip-install-wflouosi\pygetwindow\setup.py", line 11, in
long_description = fh.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 905: illegal multibyte sequence

So I tried to modify the setup.py and change the line 11:
Original:
`with open("README.md", "r") as fh:
long_description = fh.read()
`
New:
`with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
`

It looks like this change can bypass the issue,

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.