-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bad calibration result fails in web serialization #235
Comments
It shouldn't "crash" the application, does it? |
Ok, that's ok, I would state the same thing for this. The application should still be usable. We prob just need to add/activate the error handlers and/or better invocation of |
Shouldn't we fix so that the |
Sure, but isn't this ticket 2 in 1? One issue being the |
Found this: fastapi/fastapi#459, looks like it is similar issue. I could reproduce in a test case and see it comes from code in JSONEncoder: if not allow_nan:
raise ValueError(
"Out of range float values are not JSON compliant: " +
repr(o)) default must be to allow_nan=False (doesn't look like it is specifcally stated in fastapi). And no, I think it is just the one issue. Sorry for the confusion, UI seems to be more sensitive than it needs (for instance the "online" indicator should only hit |
Ah ok, cool. @imaitland can yo take a look and see what the issue there might be, please? |
Using the default calibration for OD90 seems to have parameters incompatible with our sensors, in that for some vials nan is produced, and this then results in
crashing the application (not just exception isolated to endpoint)[UI being unusable for device], with error like (snipped for brevity):Using the default calibration file and values like those read on the device, I can confirm that the fit function produces a
NaN
. While this is probably the correct thing to do in such a case, we should ensure that the app can handle or gracefully error with such values.Oddly, just doing this on python prompt produces non-error looking results:
and
So there may be something fastapi specific going on here...
The text was updated successfully, but these errors were encountered: