AutotuneWeb icon indicating copy to clipboard operation
AutotuneWeb copied to clipboard

Improved error message on Autotune run without BG-data

Open petervanrijt opened this issue 3 years ago • 1 comments

Hello Mark,

In OpenAPS I have created some code for improving the error message on Autotune. This, because sometimes I mention Facebook help requests because of Autotune error message. See https://github.com/openaps/oref0/pull/1404 for code and background information. It is approved by Scott Leibrand and merged into dev. Perhaps this is something to include in AutotuneWeb? If so, users will see a improved error message when there are no BG-values for selected dates. Love to hear.

All the best, Peter

petervanrijt avatar Aug 18 '21 11:08 petervanrijt

Thanks Peter!

I've just run a test job using this version and received the following error:

oref0-autotune-prep   ns-treatments.2021-08-17.json profile.json ns-entries.2021-08-17.json profile.pump.json > autotune.2021-08-17.json
/usr/src/oref0/bin/oref0-autotune-prep.js:107
        return console.error("Warning: could not parse "+glucose_input", e);
                                                                      ^^^^^^

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    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 Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
Warning: API_SECRET is not set when calling oref0-autotune.sh
(this is only a problem if you have locked down read-only access to your NS).
Could not run oref0-autotune-prep ns-treatments.2021-08-17.json profile.json ns-entries.2021-08-17.json

Do you have any suggestions of any other changes I need to make to the VM image to get this to work?

MarkMpn avatar Aug 18 '21 21:08 MarkMpn