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

open('docs/introduction.rst').read()) and UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 10312: character maps to <undefined> #978

Closed
bsekiewicz opened this issue Sep 2, 2021 · 0 comments · Fixed by #998

Comments

@bsekiewicz
Copy link

When I try to install a package from GitHub, it gives me an error:

ERROR: Command errored out with exit status 1:
     command: 'D:\apps\Anaconda3\envs\autospider\python.exe' -c 'import sys, setuptools, tok
enize; sys.argv[0] = '"'"'C:\\Users\\AppData\\Local\\Temp\\pip-req-build-mvfy06ye\\se
tup.py'"'"'; __file__='"'"'C:\\Users\\AppData\\Local\\Temp\\pip-req-build-mvfy06ye\\s
etup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info -
-egg-base 'C:\Users\barto\AppData\Local\Temp\pip-pip-egg-info-i5jufi9v'
         cwd: C:\Users\barto\AppData\Local\Temp\pip-req-build-mvfy06ye\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\AppData\Local\Temp\pip-req-build-mvfy06ye\setup.py", line 6, in <
module>
        introduction = re.sub(r':members:.+|..\sautomodule::.+|:class:|:func:|:ref:', '', op
en('docs/introduction.rst').read())
      File "\apps\Anaconda3\envs\lib\encodings\cp1250.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 10312: character
maps to <undefined>

The problem is with introduction.rst file. Changing open('docs/introduction.rst').read()) in my fork repo into open('docs/introduction.rst', encoding='utf-8').read()) in setup.py solved problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants