Can't handle negative values

#1
by sgbaird - opened
Acceleration Consortium org

Topic: USS-DBS51-30/{pico_id}
QoS: 0
{"Current Weight": "- 14.8g", "Date": "2025-03-26", "Time": "15:12:40"}

Error processing message: could not convert string to float: '- 14.7'

Acceleration Consortium org

In general it might be better to use a variable name: weight_g with just a float. The space between - and 14.8g is also problematic.

Acceleration Consortium org
edited Mar 26, 2025

@evelyn-nesher19 something rather strange going on with the scale data. Originally throwing the error above, but when I corrected the parsing issue, it's showing an increase in the weight as if it's a running sum:

image.png

Acceleration Consortium org

Switched to matplotlib, seems to be working ok. I think plotly may not be supported by gradio

sgbaird changed discussion status to closed

Sign up or log in to comment