crisp-im / python-crisp-api

🐍 Crisp API Python Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
27 stars 11 forks source link

python2 install errror #12

Open DatCGI2net opened 3 years ago

DatCGI2net commented 3 years ago

Hi,

It seems the setup does not support python2. I try pip install crisp-api in python2 environment and got this errors:

Collecting crisp-api Downloading crisp-api-1.1.8.tar.gz (10 kB) ERROR: Command errored out with exit status 1: command: /home/dat/.venv2/fue/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Mju4zm/crisp-api/setup.py'"'"'; file='"'"'/tmp/pip-install-Mju4zm/crisp-api/setup.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 /tmp/pip-pip-egg-info-_CsMkr cwd: /tmp/pip-install-Mju4zm/crisp-api/ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-Mju4zm/crisp-api/setup.py", line 16, in long_description=open('README.md', encoding='utf-8').read(), TypeError: 'encoding' is an invalid keyword argument for this function

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

eliottvincent commented 3 years ago

Hello! That's right, this library only supports Python 3. The error you see is because the open function changed between Python 2 and Python 3.