Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

darwin.js: TypeError: Cannot read property 'selector' of undefined #1460

Open
texclayton opened this issue Mar 2, 2018 · 2 comments
Open
Labels

Comments

@texclayton
Copy link

System information

  • Have I written custom code (as opposed to using zenbot vanilla): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS 6
  • Zenbot version (commit ref, or version): commit 84f383a
  • Zenbot branch: unstable
  • NodeJS version: 8.9.0
  • Python version (when using a python script):
  • Exact command to reproduce (include everything): ./scripts/genetic_backtester/darwin.js --generateLaunch=true --selector=gdax.ETH-USD --asset_capital=0 --currency_capital=500 --days=24 --use_strategies=rsi,speed,neural,trend_ema,trust_distrust
  • Did I make any changes to conf-sample.js?: No

Describe the problem

Error when running darwin.js. See output below.

The TypeError is due to 'params' being undefined at line 501 in darwin.js.

Source code / Error logs

Output:

Done: 205, Active: 8, Remaining: 287, Completion: 41.5% Best Balance(22): 692.4377, Slowest(204) ETA: 30m 33sCouldn't find simulationResults for 202
Bad output detected TypeError: Cannot read property 'selector' of undefined

<--- Last few GCs --->

[32131:0x39ee8b0]   289404 ms: Mark-sweep 1402.5 (1430.9) -> 1402.4 (1430.9) MB, 2621.4 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2622 ms) last resort GC in old space requested
[32131:0x39ee8b0]   292039 ms: Mark-sweep 1402.4 (1430.9) -> 1402.4 (1430.9) MB, 2633.8 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x278b23da5ec1 <JSObject>
    1: emitReadable_(aka emitReadable_) [_stream_readable.js:~511] [pc=0x3fdebf5daa77](this=0x2846a9502311 <undefined>,stream=0x30dd106dc031 <Cursor map = 0x1014a2029871>)
    3: _combinedTickCallback(aka _combinedTickCallback) [internal/process/next_tick.js:135] [bytecode=0x359bdbcf6869 offset=48](this=0x2846a9502311 <undefined>,args=0x1fc2ef7e9af9 <JSArray[1]>,callback=0x1fac964bab91 <JSFuncti...


TypeError: Cannot read property 'selector' of undefined
    at processOutput (/home/tex/zenbot/scripts/genetic_backtester/darwin.js:501:24)
    at ChildProcess.proc.on (/home/tex/zenbot/scripts/genetic_backtester/darwin.js:378:16)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
202: 43.5%, 204: 19.1%, 206: 38.3%, 207: 46.0%, 209: 60.9%, 212: 55.6%, 216: 51.1%, 217: 23.6%, 219: 38.8%
@DeviaVir DeviaVir added the bug label Mar 3, 2018
@krystophv
Copy link
Contributor

This looks like one of the child processes (the sim commands) ran out of memory and died. Are you seeing large memory usage? If so, you might want to change api output in your conf file to false.

@travisstaloch
Copy link
Contributor

I am getting this error with ta_ema when I run:

node ./scripts/genetic_backtester/darwin.js --selector=gdax.LTC-USD --order_type=taker --use_strategies=ta_ema --currency_capital=200 --asset_capital=1 --maxCores=2 --population=3 --population_data=gdaxLTC-USD --days=1

As with the currency_capital errors we were seeing before ( #1372 ), these seem to be from the strategy. I would like to run darwin with these, but I believe only srsi_macd and stddev are working for me with pull less than a week old.

--use_strategies=srsi_macd,stddev,ta_ema,ta_macd,ta_macd_ext,ta_ppo,ta_trix,ta_ultosc

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

No branches or pull requests

4 participants