I'm trying to get this to run on my linux box. I'm not normally a noob (been using linux since mid 90s) but I am a Python noob. If this was written in perl or something, no problem.
First problem was python-crypto wasn't installed. Second problem was python-simplejson wasn't installed.
1807 apt-get install python-crypto
1808 apt-get install python-simplejson
So after that, we have a new problem. (sorry for the spam, but this is how the output came out. I did delete screenfulls of blank lines at least.)
:~/goxtool$ ./goxtool.py --strategy=balancer.py
enter passphrase for secret:
testing secret...
testing key...
ok :-)
Price: 0.000000 - 0.000000 | Market: BTCUSD | Account: No info (yet)
sum_bid: 0 USD | sum_ask: 0 BTC | ratio: - USD/BTC | lag: / 0.000 s (order / socket)
### shutdown...
*** error(s) in curses_loop() that caused unclean shutdown:
Traceback (most recent call last):
File "./goxtool.py", line 1592, in curses_loop
strategy_manager = StrategyManager(gox, strat_mod_list)
File "./goxtool.py", line 1476, in __init__
self.reload()
File "./goxtool.py", line 1490, in reload
strategy_module = __import__(name)
File "/home/leela/goxtool/balancer.py", line 16, in
conf = json.load(open("user.conf"))
IOError: [Errno 2] No such file or directory: 'user.conf'
Traceback (most recent call last):
File "./goxtool.py", line 1679, in curses_loop
strategy_manager.unload()
UnboundLocalError: local variable 'strategy_manager' referenced before assignment
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 757, in run
File "/usr/lib/python2.7/threading.py", line 403, in wait
File "/usr/lib/python2.7/threading.py", line 267, in wait
: list.remove(x): x not in list
:~/goxtool$
Okay, so lets create user.conf.
:~/goxtool$ touch user.conf
:~/goxtool$ ./goxtool.py --strategy=balancer.py
enter passphrase for secret:
testing secret...
testing key...
ok :-)
Price: 0.000000 - 0.000000 | Market: BTCUSD | Account: No info (yet)
sum_bid: 0 USD | sum_ask: 0 BTC | ratio: - USD/BTC | lag: / 0.000 s (order / socket)
### shutdown...
*** error(s) in curses_loop() that caused unclean shutdown:
Traceback (most recent call last):
File "./goxtool.py", line 1592, in curses_loop
strategy_manager = StrategyManager(gox, strat_mod_list)
File "./goxtool.py", line 1476, in __init__
self.reload()
File "./goxtool.py", line 1490, in reload
strategy_module = __import__(name)
File "/home/leela/goxtool/balancer.py", line 16, in
conf = json.load(open("user.conf"))
File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 357, in load
use_decimal=use_decimal, **kw)
File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 413, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 402, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 420, in raw_decode
raise JSONDecodeError("No JSON object could be decoded", s, idx)
JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
Traceback (most recent call last):
File "./goxtool.py", line 1679, in curses_loop
strategy_manager.unload()
UnboundLocalError: local variable 'strategy_manager' referenced before assignment
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 757, in run
File "/usr/lib/python2.7/threading.py", line 403, in wait
File "/usr/lib/python2.7/threading.py", line 267, in wait
: list.remove(x): x not in list
Exception in thread Thread-2 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 759, in run
File "/home/leela/goxtool/goxapi.py", line 431, in _fire
File "/home/leela/goxtool/goxapi.py", line 371, in __call__
File "/usr/lib/python2.7/threading.py", line 121, in acquire
: 'NoneType' object is not callable
:~/goxtool$
Urghh.
The code in balancer.py has:
# Load user.conf
conf = json.load(open("user.conf"))
# Set defaults
conf.setdefault('balancer_simulate', True)
conf.setdefault('balancer_distance', 7)
conf.setdefault('balancer_fiat_cold', 0)
conf.setdefault('balancer_coin_cold', 0)
conf.setdefault('balancer_marker', 7)
conf.setdefault('balancer_compensate_fees', False)
conf.setdefault('balancer_target_margin', 1)
So I assume it would use those as defaults if there's nothing in the conf file...
Anyway, I don't know if I've pulled some new version from git or what because there's no instructions in this thread or the goxtool website about needing this conf file or what to put in it...