Fixing error with installation on windows with cp1251 #1489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Faced with installation error on Windows, last lines in exception log:
File "C:\Users\...\AppData\Local\Temp\tmp87tpzffd\.venv\lib\site-packages\setuptools\_core_metadata.py", line 136, in write_pkg_info self.write_pkg_file(f) File "<string>", line 420, in _write_pkg_file File "C:\Users\...\AppData\Local\Temp\tmp87tpzffd\.venv\lib\site-packages\setuptools\_core_metadata.py", line 210, in write_pkg_file file.write("\n%s" % long_description) File "C:\Python310\lib\tempfile.py", line 483, in func_wrapper return func(*args, **kwargs) File "C:\Python310\lib\encodings\cp1251.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\xe9' in position 20918: character maps to <undefined>
I realized that problem was in setup.py: long_description was read with utf-8, but written with local encoding which doesn't support diacritics from readme.md