Crypto-toolbox / btfxwss

Bitfinex Websocket API Client written in Python3
MIT License
284 stars 125 forks source link

How to test it, i use the Usage test code #106

Closed kintzhao closed 6 years ago

kintzhao commented 6 years ago
yhzhao@X550JD:~/blockChain/btfxwss/tests$ ./mytest.py 
from: can't read /var/mail/btfxwss
./mytest.py: line 7: syntax error near unexpected token `('
./mytest.py: line 7: `log = logging.getLogger(__name__)'

yhzhao@X550JD:~/blockChain/btfxwss/tests$ pip install btfxwss
Requirement already satisfied (use --upgrade to upgrade): btfxwss in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): websocket-client in /usr/local/lib/python2.7/dist-packages (from btfxwss)
Cleaning up...
yhzhao@X550JD:~/blockChain/btfxwss/tests$ python
Python 3.6.0 (default, Jan 13 2017, 00:00:00) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
deepbrook commented 6 years ago

You have a syntax error in your code. Could you post it ? Running the code from the README.md works for me without issues.

kintzhao commented 6 years ago

yhzhao@X550JD:~/blockChain/btfxwss/tests$ ls client_tests.py logging mytest.py sys test.py time unittest yhzhao@X550JD:~/blockChain/btfxwss/tests$ chmod 777 test.py yhzhao@X550JD:~/blockChain/btfxwss/tests$ ./test.py from: can't read /var/mail/btfxwss ./test.py: line 7: syntax error near unexpected token (' ./test.py: line 7:log = logging.getLogger(name)'

test.py

kintzhao commented 6 years ago

I installed btfxwss by pip3.

kint@ubuntu:~/blockCoin/btfxwss/tests$ python test.py Traceback (most recent call last): File "test.py", line 5, in from btfxwss import BtfxWss File "/usr/local/lib/python3.4/dist-packages/btfxwss/init.py", line 1, in from btfxwss.client import BtfxWss File "/usr/local/lib/python3.4/dist-packages/btfxwss/client.py", line 6, in from btfxwss.connection import WebSocketConnection File "/usr/local/lib/python3.4/dist-packages/btfxwss/connection.py", line 470 self.send(**q, auth=True) ^ SyntaxError: invalid syntax

deepbrook commented 6 years ago

This library requires python 3.5 or later. Earlier versions won't work.