mpigman9 / python-weather-api

Automatically exported from code.google.com/p/python-weather-api
MIT License
0 stars 0 forks source link

Wind parsing in get_weather_from_weather_com fails #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Wind parsing in the get_weather_from_weather_com fails. Here's the stack trace 
…

Exception in Thread-3 at Mon Mar 23 13:53:52 2015
Traceback (most recent call last):
...
  File "/usr/lib/python3.4/site-packages/i3pystatus/weather.py", line 45, in run
    result = pywapi.get_weather_from_weather_com(self.location_code, self.units)
  File "/usr/lib/python3.4/site-packages/pywapi.py", line 239, in get_weather_from_weather_com
    'wind')[0].getElementsByTagName(tag2)[0].firstChild.data
AttributeError: 'NoneType' object has no attribute 'data'

The fetched data from weather.com is attached (AUXX0010.xml).

Original issue reported on code.google.com by Simon.Le...@gmail.com on 23 Mar 2015 at 1:24

Attachments:

GoogleCodeExporter commented 8 years ago
This is a duplicate of #39.

Here's a patch including the fix and a test case …

Original comment by Simon.Le...@gmail.com on 24 Mar 2015 at 9:12

Attachments: