thoe0059 / python-weather-api

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

get_weather_from_weather_com raises AttributeError when XML tags are empty #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If the XML returned from Weather.com contains empty (but valid) tags, the call 
to get_weather_from_weather_com() raises an AttributeError with the following 
message:

>>> pywapi.get_weather_from_weather_com('AUX0025')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/pywapi.py", line 186, in get_weather_from_weather_com
    tag)[0].getElementsByTagName(tag2)[0].firstChild.data
AttributeError: 'NoneType' object has no attribute 'data'

Original issue reported on code.google.com by jtas...@gmail.com on 11 Feb 2014 at 3:46

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r161.

Original comment by jtas...@gmail.com on 14 Feb 2014 at 11:33

GoogleCodeExporter commented 8 years ago
Issue 35 has been merged into this issue.

Original comment by jtas...@gmail.com on 4 Jul 2014 at 4:14