RedisJSON / redisjson-py

An extension to redis-py for using Redis' ReJSON module
https://redisjson.io
BSD 2-Clause "Simplified" License
160 stars 34 forks source link

pip install rejson==0.5.0 fails #28

Closed manjiler closed 4 years ago

manjiler commented 4 years ago

Collecting rejson==0.5.0 Downloading

https://files.pythonhosted.org/packages/33/31/d85098ce0718e86b147296b296fd66b5f82f3d638d60a8798e6824b71a7a/rejson-0.5.0.tar.gz ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ehcrp3qu/rejson/setup.py'"'"'; file='"'"'/tmp/pip-install-ehcrp3qu/rejson/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-install-ehcrp3qu/rejson/pip-egg-info cwd: /tmp/pip-install-ehcrp3qu/rejson/ Complete output (9 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-ehcrp3qu/rejson/setup.py", line 24, in version = get_version('rejson') File "/tmp/pip-install-ehcrp3qu/rejson/setup.py", line 14, in get_version init_py = open(os.path.join(package, 'init.py')).read() File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1425: ordinal not in range(128)

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

I am seeing this on Mac OS 10.5 and Centos 7.4 Python Version - 3.6.4

manjiler commented 4 years ago

@gkorland Can you help with this?

gkorland commented 4 years ago

Thanks I'll give it a look, it seems to work fine on my Ubuntu. @itamarhaber

manjiler commented 4 years ago

@itamarhaber Branch fix-28 works!

Processing ./redisjson-py
Building wheels for collected packages: rejson
  Running setup.py bdist_wheel for rejson ... done
  Stored in directory: /Users/test/Library/Caches/pip/wheels/b4/ea/62/93af87b08b7c449fc10a86fb22b7868add171e4d7a5e8ba8a0
Successfully built rejson
Installing collected packages: rejson
Successfully installed rejson-0.5.1

Thanks for fixing it. When do would the PR get closed and newer be available via pip?

ykvch commented 4 years ago

Could You please add this fix to https://github.com/RedisJSON/redisjson-py/blob/master/setup.py#L18 as well, like: with io.open(f, encoding="utf-8") as I: Since currently it causes install error with FreeBSD 12 + Python 3.6.1

gkorland commented 4 years ago

@ykvch can you please submit a PR

ykvch commented 4 years ago

@gkorland , could You please check the PR above.