BlockchainCommons/spotbit

can't install spotbit

Closed this issue · 1 comments

Abstract

I followed the installation steps, but the service won't start. (Debian 10)
Passing onion address to the script?

EDIT: I'm seeing ctx library removed an exchange which is hardcoded in server.py. Removing it fixes it.

*******************************************************************************
-------Spotbit - Spotbit has been configured. Start spotbit server like so:

sudo systemctl start spotbit

Then access it on clearnet at:
http://localhost:5000

OR on it's onion(Tor) address (located at /var/lib/tor/spotbit/hostname):
pzgllcd72gcf2xhxrxfseh76y6pzahxwmdwvx7eammfpsxi2xkizhgid.onion
*******************************************************************************

root@localhost:~/spotbit# journalctl -u spotbit.service 
-- Logs begin at Tue 2021-01-05 20:21:03 UTC, end at Tue 2021-01-05 20:45:49 UTC
Jan 05 20:44:51 localhost systemd[1]: Started Spotbit.
Jan 05 20:44:52 localhost python3.8[26187]: db opened in /home/spotbit/.spotbit/
Jan 05 20:44:52 localhost python3.8[26187]: cant find ONION in PATH 'ONION'
Jan 05 20:44:52 localhost python3.8[26187]: Traceback (most recent call last):
Jan 05 20:44:52 localhost python3.8[26187]:   File "/home/spotbit/spotbit/server
Jan 05 20:44:52 localhost python3.8[26187]:     ex_objs = init_supported_exchang
Jan 05 20:44:52 localhost python3.8[26187]:   File "/home/spotbit/spotbit/server
Jan 05 20:44:52 localhost python3.8[26187]:     objects = {"acx":ccxt.acx(), "ao
Jan 05 20:44:52 localhost python3.8[26187]: AttributeError: module 'ccxt' has no
Jan 05 20:44:52 localhost systemd[1]: spotbit.service: Main process exited, code
Jan 05 20:44:52 localhost systemd[1]: spotbit.service: Failed with result 'exit-
root@localhost:~/spotbit# journalctl -u spotbit.service 
-- Logs begin at Tue 2021-01-05 20:21:03 UTC, end at Tue 2021-01-05 20:46:36 UTC. --
Jan 05 20:44:51 localhost systemd[1]: Started Spotbit.
Jan 05 20:44:52 localhost python3.8[26187]: db opened in /home/spotbit/.spotbit/sb.db
Jan 05 20:44:52 localhost python3.8[26187]: cant find ONION in PATH 'ONION'
Jan 05 20:44:52 localhost python3.8[26187]: Traceback (most recent call last):
Jan 05 20:44:52 localhost python3.8[26187]:   File "/home/spotbit/spotbit/server.py", line 100, in <module>
Jan 05 20:44:52 localhost python3.8[26187]:     ex_objs = init_supported_exchanges()
Jan 05 20:44:52 localhost python3.8[26187]:   File "/home/spotbit/spotbit/server.py", line 76, in init_supported_exchanges
Jan 05 20:44:52 localhost python3.8[26187]:     objects = {"acx":ccxt.acx(), "aofex":ccxt.aofex(), "bequant":ccxt.bequant(), "bibox":ccxt.bibox(), "bigone":ccxt.bigone(), "binance":ccxt.binance(), "bitbank":ccxt
Jan 05 20:44:52 localhost python3.8[26187]: AttributeError: module 'ccxt' has no attribute 'livecoin'
Jan 05 20:44:52 localhost systemd[1]: spotbit.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 20:44:52 localhost systemd[1]: spotbit.service: Failed with result 'exit-code'.
Jan 05 20:44:52 localhost systemd[1]: spotbit.service: Service RestartSec=100ms expired, scheduling restart.

Fixed in master. Spotbit now only use exchanges supported in the installed version of ccxt.