sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
951 stars 403 forks source link

Very specific .weather request tries to len() a None object. #197

Closed tyrope closed 11 years ago

tyrope commented 11 years ago

[1550.55] < jash> .weather [1550.56] <@ Willie> Yahoo! Weather - Stuttgart, DE: Sunny, 3°C (37°F), 30in (1023mb), Light breeze 6kt (↓) [1551.05] <&Tyrope> .weather jash [1551.06] <@ Willie> TypeError: object of type 'NoneType' has no len() (file "/home/willie/jenni/willie/modules/weather.py", line 35, in woeid_search)

tyrope commented 11 years ago

Signature: TypeError: object of type 'NoneType' has no len() (file "/home/willie/jenni/willie/modules/weather.py", line 35, in woeid_search) from #YourPants at 2013-03-02 09:51:01.735773: Message was: .weather jash Traceback (most recent call last): File "/home/willie/jenni/willie/bot.py", line 415, in call "warning") File "/home/willie/jenni/willie/modules/weather.py", line 137, in weather woeid = woeid_search(location).find('woeid').text File "/home/willie/jenni/willie/modules/weather.py", line 35, in woeid_search if len(first_result) == 0: TypeError: object of type 'NoneType' has no len()