[GH-ISSUE #93] README.rst contains non-ASCII characters fails installtion #55

Closed
opened 2026-02-26 01:33:00 +03:00 by kerem · 2 comments
Owner

Originally created by @NateScarlet on GitHub (Apr 2, 2019).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/93

> pip install sandman2
Collecting sandman2
  Using cached https://files.pythonhosted.org/packages/34/43/65317a5a01c16d494a68b37bc21d9cbe17c3fd089b76835fdbda60f1973b/sandman2-1.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\34357\AppData\Local\Temp\pip-install-1toj7xsk\sandman2\setup.py", line 19, in <module>
        LONG_DESCRIPTION = read('README.rst')
      File "C:\Users\34357\AppData\Local\Temp\pip-install-1toj7xsk\sandman2\setup.py", line 17, in read
        return codecs.open(os.path.join(HERE, *parts), 'r').read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 2084: illegal multibyte sequence

Solution1

README.rst contains non-ASCII character , should replace it with ASCII character '
See https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690

Solution2

github.com/jeffknupp/sandman2@1ce21d6f7a/setup.py (L16-L17)

Intentionally do adding an 'utf-8' encoding option to open

Originally created by @NateScarlet on GitHub (Apr 2, 2019). Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/93 ```powershell > pip install sandman2 Collecting sandman2 Using cached https://files.pythonhosted.org/packages/34/43/65317a5a01c16d494a68b37bc21d9cbe17c3fd089b76835fdbda60f1973b/sandman2-1.2.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\34357\AppData\Local\Temp\pip-install-1toj7xsk\sandman2\setup.py", line 19, in <module> LONG_DESCRIPTION = read('README.rst') File "C:\Users\34357\AppData\Local\Temp\pip-install-1toj7xsk\sandman2\setup.py", line 17, in read return codecs.open(os.path.join(HERE, *parts), 'r').read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 2084: illegal multibyte sequence ``` # Solution1 README.rst contains non-ASCII character `’`, should replace it with ASCII character `'` See https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 # Solution2 https://github.com/jeffknupp/sandman2/blob/1ce21d6f7a6df77fa96fab694b0f9bb8469c166b/setup.py#L16-L17 Intentionally *do* adding an 'utf-8' encoding option to open
kerem closed this issue 2026-02-26 01:33:00 +03:00
Author
Owner

@Expire0 commented on GitHub (May 12, 2019):

I submitted a pull request for this and hopefully we can get it merged. The installation continued to fail until i added the encoding argument. Pull request https://github.com/jeffknupp/sandman2/pull/99

<!-- gh-comment-id:491606141 --> @Expire0 commented on GitHub (May 12, 2019): I submitted a pull request for this and hopefully we can get it merged. The installation continued to fail until i added the encoding argument. Pull request https://github.com/jeffknupp/sandman2/pull/99
Author
Owner

@jeffknupp commented on GitHub (May 29, 2019):

Fixed by #99

<!-- gh-comment-id:496736977 --> @jeffknupp commented on GitHub (May 29, 2019): Fixed by #99
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sandman2-jeffknupp#55
No description provided.