Crashes when YQL returns abnormal data
BrianMitchL opened this issue · comments
Stack trace:
2015-04-12 06:45:10,045 ERROR 'NoneType' object is not subscriptable
2015-04-12 06:45:10,045 ERROR We got an exception!
Traceback (most recent call last):
File "weatherBot.py", line 266, in run
main()
File "weatherBot.py", line 219, in main
get_weather_variables(ydata)
File "weatherBot.py", line 109, in get_weather_variables
units = ydata['query']['results']['channel']['units']
TypeError: 'NoneType' object is not subscriptable
Should be fixed in 0575401 *fingers crossed
Well, it still crashes:
2015-04-14 05:23:58,077 ERROR 'NoneType' object is not subscriptable
2015-04-14 05:23:58,078 ERROR We got an exception!
Traceback (most recent call last):
File "weatherBot.py", line 266, in run
main()
File "weatherBot.py", line 216, in main
if ydata['query']['results']['channel'] is None:
TypeError: 'NoneType' object is not subscriptable
There is much better error handling starting in cc7f517, this should fall under that.