This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Genetic back tester fails to fetch test results because of ansi codes #578
Labels
Comments
just saw that auto_backtester has the same problem |
Hi @JensvdHeydt, excellent finding and thanks for doing the leg work on finding a solution for it. I think your suggestion for adding |
Hi @DeviaVir, I'll submit a PR shortly. I'm glad I could help |
JensvdHeydt
pushed a commit
to JensvdHeydt/zenbot
that referenced
this issue
Oct 3, 2017
…be properly interpreted. The used color.js library does have a "--no-color" switch that should solve the above problem but that library isn't under active development anymore and currently has several bugs regarding the --no-color switch. Since zenbot has a very tight coupling to color.js this is the only way to solve the problem from DeviaVir#578. Solves: DeviaVir#578
JensvdHeydt
pushed a commit
to JensvdHeydt/zenbot
that referenced
this issue
Oct 3, 2017
…be properly interpreted. (DeviaVir#578) The used color.js library does have a "--no-color" switch that should solve the above problem but that library isn't under active development anymore and currently has several bugs regarding the --no-color switch. Since zenbot has a very tight coupling to color.js this is the only way to solve the problem from DeviaVir#578. Solves: DeviaVir#578
JensvdHeydt
pushed a commit
to JensvdHeydt/zenbot
that referenced
this issue
Oct 3, 2017
…be properly interpreted. (DeviaVir#578) The used color.js library does have a "--no-color" switch that should solve the above problem but that library isn't under active development anymore and currently has several bugs regarding the --no-color switch. Since zenbot has a very tight coupling to color.js this is the only way to solve the problem from DeviaVir#578. Solves: DeviaVir#578
DeviaVir
pushed a commit
that referenced
this issue
Oct 3, 2017
…be properly interpreted. (#578) (#581) The used color.js library does have a "--no-color" switch that should solve the above problem but that library isn't under active development anymore and currently has several bugs regarding the --no-color switch. Since zenbot has a very tight coupling to color.js this is the only way to solve the problem from #578. Solves: #578
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
There's a problem regarding #577 and the output containing ansi format codes (for colors).
The processOutput function constantly fails with the error message "Bad output detected" because the analysed simulation results contain ansi format codes and the corresponding regex functions to filter the results don't support these.
It's easily fixed with the npm module strip-ansi (https://www.npmjs.com/package/strip-ansi) at line 101 of of darwin.js:
let strippedOutput = StripAnsi(output);
let output2 = strippedOutput.substr(strippedOutput.length - 3500);
and
let StripAnsi = require('strip-ansi');
in the head of the file.
An even better solution would be to introduce a zenbot parameter called "--no-ansi" that would prevent zenbot from even using ansi color codes in it's results in the first place.
Please let me know if you're interested in a small pull request regarding solution 1 or 2.
Cheers,
Jens
The text was updated successfully, but these errors were encountered: