You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/usr/local/lib/python3.9/dist-packages/pywws/conversions.py",
line 199, in dew_point
gamma = ((a * temp) / (b + temp)) + math.log(float(hum) / 100)
ValueError: math domain error
When this happened, every time we tried to relaunch the program it failed with the same error message. Somehow, it seems that hum took a value of zero, hence the math domain error of the logarithm.
To work around the problem we have locally changed line 195 of conversion.py to:
if temp is None or hum is None or hum == 0:
Weather station model is PCE-FWS 20N. pywws-version is 23.2.0. It is running on a Raspberry Pi.
The text was updated successfully, but these errors were encountered:
A humidity value of zero is invalid, so ideally you need to find it in your data and remove it.
If it happens a lot with your station you could deal with it in a user calibration module:
class Calib(object):
def calib(self, raw):
result = dict(raw)
if not (result['hum_in'] and result['hum_in'] >= 20):
result['hum_in'] = None
if not (result['hum_out'] and result['hum_out'] >= 20):
result['hum_out'] = None
return result
livelog crashed with this error:
File "/usr/local/lib/python3.9/dist-packages/pywws/conversions.py",
line 199, in dew_point
gamma = ((a * temp) / (b + temp)) + math.log(float(hum) / 100)
ValueError: math domain error
When this happened, every time we tried to relaunch the program it failed with the same error message. Somehow, it seems that hum took a value of zero, hence the math domain error of the logarithm.
To work around the problem we have locally changed line 195 of conversion.py to:
if temp is None or hum is None or hum == 0:
Weather station model is PCE-FWS 20N. pywws-version is 23.2.0. It is running on a Raspberry Pi.
The text was updated successfully, but these errors were encountered: