get_dew_point raises unhandled ValueError with negative humidity
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
my-weather-indicator |
Fix Released
|
Critical
|
Lorenzo Carbonell |
Bug Description
kolson@rwx:~$ /opt/extras.
/home/kolson
<gettext.
No LSB modules are available.
#######
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
Version: x86_64
#######
My-Weather-
#######
('/home/
{"time":"2013-04-16 08:42",
SE
(<type 'str'>, u'26 \xb0F')
################
mwi-wind12.png
SE
(<type 'str'>, u'26 \xb0F')
################
mwi-wind12.png
start now
East
(<type 'str'>, u'26 \xb0F')
################
mwi-wind00.png
SE
(<type 'str'>, u'26 \xb0F')
################
mwi-wind12.png
ESE
(<type 'str'>, u'31 \xb0F')
################
mwi-wind10.png
ESE
(<type 'str'>, u'32 \xb0F')
################
mwi-wind10.png
Traceback (most recent call last):
File "/opt/extras.
self.set_menu()
File "/opt/extras.
weather = self.weatherser
File "/opt/extras.
weather_data = self._get_weather()
File "/opt/extras.
weather_
File "/opt/extras.
dp = math.pow(
ValueError: math domain error
Changed in my-weather-indicator: | |
assignee: | nobody → Lorenzo Carbonell (lorenzo-carbonell) |
importance: | Undecided → Critical |
status: | Confirmed → Fix Released |
I believe the only possible cause for this is when h is negative. I have no idea how this changes the dew point calculation, but with the following change I have been running without error for 24 hours now:
dp = math.pow( math.fabs( h)/100. 0,1.0/8. 0)*(110. 0+t) - 110.0