notadamking / RLTrader

A cryptocurrency trading environment using deep reinforcement learning and OpenAI's gym
https://discord.gg/ZZ7BGWh
GNU General Public License v3.0
1.71k stars 537 forks source link

syntax errors #118

Closed Justinikus closed 4 years ago

Justinikus commented 5 years ago

I just downloaded the latest onto a fresh Ubuntu install, and tried to follow the setup instructions. I keep getting syntax errors in optimize.py and cli.py, both appear to be associated with loggers. Anybody know what this is?

python3 optimize.py multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, *kwds)) File "/usr/lib/python3.5/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "optimize.py", line 10, in optimize_code from lib.RLTrader import RLTrader File "/home/cluster/Downloads/RLTrader-master/RLTrader/lib/RLTrader.py", line 63 self.logger.debug(f'Initialize RLTrader: {self.study_name}') ^ SyntaxError: invalid syntax """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "optimize.py", line 21, in opt_pool.map(optimizecode, [params for in range(n_processes)]) File "/usr/lib/python3.5/multiprocessing/pool.py", line 260, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get raise self._value File "/home/cluster/Downloads/RLTrader-master/RLTrader/lib/RLTrader.py", line 63 self.logger.debug(f'Initialize RLTrader: {self.study_name}') ^ SyntaxError: invalid syntax

In cli.py:

python ./cli.py update-static-data File "./cli.py", line 17 trader = RLTrader(**vars(args), logger=logger) ^ SyntaxError: invalid syntax

assaf-m commented 4 years ago

Try using python 3.7.3, I also experienced issues with logger using python 3.5. Or even better - install the entire thing with virtualenv / venv set as a python 3.7.3.

Justinikus commented 4 years ago

So, it seems only my Ubuntu 16 machines had this difficulty. A different machine ungraded to Ubuntu 18 runs it.