[geography] Handle geonames overload

Bug #702810 reported by Stefano Rivera
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Low
marcog

Bug Description

2011-01-14 12:05:40,123 ERROR core.dispatcher: Exception occured in TimeZone processor of geography plugin.
Event: {'account': 1, 'responses': [], 'source': u'shadowfire', 'addressed': True, 'processed': False, 'time': datetime.datetime(2011, 1, 14, 10, 5, 39, 460575), 'identity': 55, 'message': {'raw': u'time in jhb', 'deaddressed': u'time in jhb', 'clean': u'time in jhb', 'stripped': u'time in jhb'}, 'type': u'message', 'public': False, 'channel': u'tumbleweed!~<email address hidden>', 'sender': {'nick': u'tumbleweed', 'connection': u'tumbleweed!~<email address hidden>', 'id': u'tumbleweed'}}
Traceback (most recent call last):
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/core.py", line 33, in _process
    processor.process(event)
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/plugins/__init__.py", line 145, in process
    method(event, *match.groups())
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/plugins/geography.py", line 370, in time
    self.convert(event, None, None, place)
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/plugins/geography.py", line 355, in convert
    to_zone = self._find_timezone(to)
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/plugins/geography.py", line 319, in _find_timezone
    zone = self._geonames_lookup(string)
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/plugins/geography.py", line 328, in _geonames_lookup
    if search['totalResultsCount'] == 0:
KeyError: 'totalResultsCount'

2011-01-14 12:05:40,123 INFO plugins.geography: JSON: {u'status': {u'message': u'the free servers are currently overloaded with requests.', u'value': 22}}

Related branches

Changed in ibid:
importance: Undecided → Low
milestone: none → 0.1.1
status: New → Triaged
marcog (marco-gallotta)
Changed in ibid:
assignee: nobody → marcog (marco-gallotta)
marcog (marco-gallotta)
Changed in ibid:
status: Triaged → In Progress
marcog (marco-gallotta)
Changed in ibid:
milestone: 0.1.1 → 0.1.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers