StackStorm / st2sdk

This repository contains different utilities and tools which help with the StackStorm integration pack development.
Apache License 2.0
10 stars 11 forks source link

decoding issue during pip install on Windows #22

Closed chris3081 closed 6 years ago

chris3081 commented 6 years ago

Hi Folks,

Just a quick issue, if you are attempting to install the st2sdk on windows via pip install st2sdk you get the following error

C:\Python36_64\Scripts>pip install st2sdk Collecting st2sdk Using cached https://files.pythonhosted.org/packages/9f/82/3dd9bd7ce48e405d1ac78d0098a4fec52f00672a10d5e3505251a7ad7b4f/st2sdk-0.2.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\cy\AppData\Local\Temp\1\pip-install-3j4y5kao\st2sdk\setup.py", line 47, in long_description=open('README.rst').read(), File "c:\python36_64\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 1032: character maps to

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\cy\AppData\Local\Temp\1\pip-install-3j4y5kao\st2sdk\

I ended up downloading the tar.gz and manually adding replacing the following line in Setup.py (line 47)

long_description=open('README.rst').read(),

with

long_description=open('README.rst', encoding='utf-8').read(),
Kami commented 6 years ago

Thanks for reporting this.

I will work on a fix and push a new version to PyPi shortly :)

EDIT: I noticed you are trying to install it using Python 3 - this will require a bit more work since encoding parameter is not available in the open function in Python 2.

Kami commented 6 years ago

23 should fix this issue.

I also added some tests / checks which will automatically catch some of the Python 3 related issues in the future.

Thanks again for reporting this.

Kami commented 6 years ago

I merged fixes and tests in #23 and pushed new version to PyPi (0.3.1).

I confirmed installation now works under Python 3 on Linux (I don't have quick access to Windows machine here at the moment).

chris3081 commented 6 years ago

Thanks @Kami