kmadac / bitstamp-python-client

Python package to communicate with bitstamp.net
MIT License
144 stars 70 forks source link

Installation error #3

Closed jacopsd closed 10 years ago

jacopsd commented 10 years ago

I am installing as python3 lib and get a syntaxt error. Is this module suited for python3?

sudo pip install git+git://github.com/kmadac/bitstamp-python-client.git Downloading/unpacking git+git://github.com/kmadac/bitstamp-python-client.git Cloning git://github.com/kmadac/bitstamp-python-client.git to /tmp/pip-2txc1a-build Running setup.py egg_info for package from git+git://github.com/kmadac/bitstamp-python-client.git

Installing collected packages: TradingBitStamp Running setup.py install for TradingBitStamp File "/usr/local/lib/python3.2/dist-packages/bitstamp/client.py", line 158 if r.text == u'true': ^ SyntaxError: invalid syntax

Successfully installed TradingBitStamp Cleaning up...

kmadac commented 10 years ago

Hello,

Unfortunately I haven't tested it in Python 3. It was developed with Python 2.7.3. I just checked where could be the problem, and it seems that Python 3 doesn't support unicode literals anymore. I will check whether it is possible to change code to support both python versions.

kmadac commented 10 years ago

Hi, Unicode literal is back again in Python 3.3. I have prepared new client version working in Python 2.7 and in 3.3 too. You can expect new commit by tomorrow.

kmadac commented 10 years ago

Hi,

Python 3.3 compatibility commit was pushed. bitstamp-python-client package is now compatible with python v2.7 and v3.3. It is not worth to make it compatible with 3.2, because it would take lot of time and could bring bugs. You should be able to install either 2.7 or 3.3 in virtual environment.

jacopsd commented 10 years ago

Hi

Tested your code in python3, got it working now.

Remark: The example code has 2 small errors:

Thank you for sharing! Davy

kmadac commented 10 years ago

Thanks for fix Davy.