Gab0 / japonicus

Genetic Algorithm for Gekko Trading Bot.
MIT License
285 stars 102 forks source link

Docker issue: "Aborted: gekko.js not found on path specified @Settings.py" #176

Open rcoenen opened 5 years ago

rcoenen commented 5 years ago

Where do I specify the path to Gekko?

japnoicus.pyhas this

        if not os.path.isfile(settings['global']['gekkoPath'] + '/gekko.js'):
            print("Aborted: gekko.js not found on path specified @Settings.py;")
            exit(1)
Gab0 commented 5 years ago

This path is set at japonicus/settings/global.toml.

rcoenen commented 5 years ago

OK 1 step closer: /settings/_global.toml has gekkoPath = '$HOME/gekko' and configFilename = 'example-config.js'

I changed $HOME/gekko to $HOME/Development/gekko since this is the right path on my setup.

However, Gekko v0.6.8 (latest stable) has no example-config.js in the gekko root dir anymore

any idea how to proceed?

rcoenen commented 5 years ago

Update: ok the file is called sample-config.js not example-config.js

rcoenen commented 5 years ago

Ok so it seems that Japonicus trying to find gekko.js inside it's own Docker virtual file system, not on the actual host file system. Or actually in the other container where Gekko is running. Unsure how that hangs together I am a total newbie but they way how it's setup according to the wiki cannot work. There is no gekko.js in the Japonicus container

Gab0 commented 5 years ago

I never used the docker setup much lol, but from what I recall japonicus should not find gekko.js, it will connect to gekko thru http://gekko:3000 that gekko's container will expose.

Maybe I have changed japonicus to make sure gekkoPathactually points to the gekko exec? Then docker-compose will not work... I need to sort this out, let me know if you find something.

rcoenen commented 5 years ago

I will have a go at this today but just so that I understand my setup: A) Gekko in: /Users/rob/Development/ B) Japonicus in/Users/rob/Development/japonicus/

1) If japonicus needs reach gekko through http://gekko:3000 will it be able to update evolution_gen.csv? is that file supposed to be in the Gekko directory (A) or in the Japonicus directory? Assumption is that evolution_gen.csv will be in the Janopicus directory and therefor Janopicus does not need file system/write access in the Gekko directory 2) Have you ever got Gekko latest stable (V0.6.8) + Japonicus (current master) got to work together correctly? And if yes - did you manage to get it to work using Docker?

rcoenen commented 5 years ago

here is how I got it to work:

comment these lines out in japonicus.py It basically does not bother to find gekko.js. This will obviously only work when running Gekko + Japonicus in Docker

        # if not os.path.isfile(settings['global']['gekkoPath'] + '/gekko.js'):
        #     print(settings['global']['gekkoPath'] + '/gekko.js')
        #     print( os.listdir("/") )
        #     print("Aborted: gekko.js not found on path specified @Settings.py;")
        #     exit(1)