tommiehansen / gab

Gekko Automated Backtests
57 stars 19 forks source link

datasets non-object on fresh run #1

Closed simpsus closed 6 years ago

simpsus commented 6 years ago

sorry if you don't accept issues. I get

Notice: Trying to get property of non-object in /var/www/html/gab/system/class.gab.php on line 119 Warning: Invalid argument supplied for foreach() in /var/www/html/gab/select.php on line 83

gekko has datasets available in the ui. At first I thought this was a missing / in the conf.php server variable, but that didn't fix it.

The only thing I have odd in my setup is that I copied gab to /var/www/html. Using a symlink there and having it in the gekko dir doesn't make a difference though.

Any hint on what this might be?

tommiehansen commented 6 years ago

This stricly means that the datasets could not be fetched, thus the 'non-object' since the request didn't answer with one.

This could mean any of the following:

  1. Your $server is wrong at system/conf.php and thus it cannot access the datasets. Default is http://localhost:3000/api/
  2. You do not have PHP cURL installed and working (thus it can't fetch anything via cURL)
  3. You are not running Gekko, so no Gekko API available
  4. Something else
simpsus commented 6 years ago

Thanks for your reply. 2) and 3) I can rule out. I have gekko running and my untouched strat live paper traders bringing in losses. And I rechecked and have php-curl installed.

I would like to ask a follow-up question to 1) I run a VPS and I access my gekko with http://[IP]:3000

The adress bar then jumps to show [IP]:3000/#/home and Michael Douglas appears. That is standard behaviour, right? So how would that translate to the conf.php entry? I think that the default should be correct. I tried exchanging localhost with the public IP, I tried without the api appendix (but that makes sense to me. All with the same result. Is there any way I can troubleshoot that connection issue? When I enter http://[IP]:3000/api/datasets in the browser it simply gives my a "not found". Not a 404 but "not found".

Otherwise I am stuck & lost with 4)

Thank you

simpsus commented 6 years ago

Okay, figured it out. it was a combination that the user owning the gab directory has to have access there and that the trailing slash of the gekko adress is important.