python-powerdns icon indicating copy to clipboard operation
python-powerdns copied to clipboard

`UnicodeDecode error`on Windows install via pip

Open mpibpc-mroose opened this issue 3 years ago • 2 comments

Whe installieng your package on Windows I get:

pip install python-powerdns                  
Collecting python-powerdns
  Using cached python-powerdns-2.1.0.tar.gz (14 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 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\mroose\AppData\Local\Temp\pip-install-9lebja68\python-powerdns_acda99872ed242afb6c7bfa0fc067fd1\setup.py", line 36, in <module>
          long_description=open(readme_file).read(),
        File "C:\Python39\lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5076: character maps to <undefined>
      [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.

This is possibly caused by the statement:

long_description=open(readme_file).read(),

which should maybe changed to:

long_description=open(readme_file, 'r', encoding='UTF-8').read(),

As there are more open statements in setup.py the may get changed, too.

mpibpc-mroose avatar Apr 14 '22 13:04 mpibpc-mroose

I also got this error

MrArabboy avatar Aug 03 '22 05:08 MrArabboy

#34

jon02ch avatar Aug 31 '23 09:08 jon02ch