Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'exchange' of undefined #53

Open
CryptoCoeus opened this issue Sep 5, 2018 · 4 comments
Open

Cannot read property 'exchange' of undefined #53

CryptoCoeus opened this issue Sep 5, 2018 · 4 comments

Comments

@CryptoCoeus
Copy link

Hey Guys,

My gekko version 0.6 & gekkoga is the latest stable version - as of date.

When i run, i am following errors :

Gekko :

uncaughtException TypeError: Cannot read property 'exchange' of undefined
    at Object.<anonymous> (/Users/CryptoCoeus/gekko-geneticAlgo/plugins/sqlite/handle.js:28:27)

gekkoga :
No previous run data, starting from scratch! Starting GA with epoch populations of 20, running 5 units at a time! { StatusCodeError: 500 - "Internal Server Error"

Does anybody have any idea what is wrong ?

@123qweas
Copy link

123qweas commented Sep 5, 2018

Have you applied the changes?

https://github.com/gekkowarez/gekkoga/pulls

@Milleman
Copy link

Same issue! On Windows 10. Updated everything but it still does not work. I think there is something extra missing that should be installed, but i have no idea what...

Gekkoga cmd:

node run -c config/your-new.js
No previous run data, starting from scratch!
Starting GA with epoch populations of 20, running 5 units at a time!
{ StatusCodeError: 500 - "Internal Server Error"
at new StatusCodeError (C:\Users\MHN\Downloads\gekko-develop\node_modules\request-promise-core\lib\errors.js:32:15)
at Request.plumbing.callback (C:\Users\MHN\Downloads\gekko-develop\node_modules\request-promise-core\lib\plumbing.js:104:33)
at Request.RP$callback [as _callback] (C:\Users\MHN\Downloads\gekko-develop\node_modules\request-promise-core\lib\plumbing.js:46:31)
at Request.self.callback (C:\Users\MHN\Downloads\gekko-develop\node_modules\request\request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (C:\Users\MHN\Downloads\gekko-develop\node_modules\request\request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (C:\Users\MHN\Downloads\gekko-develop\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
name: 'StatusCodeError',
statusCode: 500,
message: '500 - "Internal Server Error"',
... etc

gekko/web cmd:
uncaughtException TypeError: Cannot read property 'exchange' of undefined
at Object. (C:\Users\MHN\Downloads\gekko-develop\plugins\sqlite\handle.js:28:27)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\MHN\Downloads\gekko-develop\plugins\sqlite\reader.js:6:14)
at Module._compile (module.js:652:30)
uncaughtException TypeError: Cannot read property 'exchange' of undefined
at Object. (C:\Users\MHN\Downloads\gekko-develop\plugins\sqlite\handle.js:28:27)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
... etc

@matthhong
Copy link

matthhong commented Sep 24, 2018

In your gekko repository (not gekkoga), find web/routes/backtest.js.

Change line 26 to var req = this.request.body.gekkoConfig || this.request.body;.

Obviously this is a makeshift solution, but it addresses the issue & shows where the changes should be made in gekkoga (the POST payload does not agree with gekko).

@matthhong
Copy link

matthhong commented Sep 24, 2018

You will then get a timeout error after running gekkoga, unfortunately. To solve this issue, checkout pull request #49:

git fetch origin pull/49/head:49

git checkout 49

Then create your-config.js again with the sample-config.js from #49 before running gekkoga.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants