bellrichm / weewx-aqi-xtype

A WeeWX XType to calclulate AQI.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Cannot convert float NaN to integer #15

Open dshanske opened 1 month ago

dshanske commented 1 month ago

Got another one...

Sep 26 17:08:33 ozonepark weewxd[3594098]: File "/etc/weewx/bin/user/aqitype.py", line 475, in get_scalar Sep 26 17:08:33 ozonepark weewxd[3594098]: aqi = self.aqi_fields[obs_type]['calculator'].calculate(db_manager, record['dateTime'], record[dependent_field], aqi> Sep 26 17:08:33 ozonepark weewxd[3594098]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^> Sep 26 17:08:33 ozonepark weewxd[3594098]: File "/etc/weewx/bin/user/aqitype.py", line 366, in calculate Sep 26 17:08:33 ozonepark weewxd[3594098]: aqi = round(((aqi_bp_max - aqi_bp_min)/(reading_bp_max - reading_bp_min) * (reading - reading_bp_min)) + aqi_bp_min) Sep 26 17:08:33 ozonepark weewxd[3594098]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Sep 26 17:08:33 ozonepark weewxd[3594098]: ValueError: cannot convert float NaN to integer

bellrichm commented 1 month ago

For some reason I thought you had given up on this extension. Can you remind me what version you are running? Thinking that noone was using it, I got a bit sloppy on my development. Got a few too many irons in the fire, but I will look into this.

dshanske commented 1 month ago

Last development version. I had uninstalled it till that fix had gone in.