weather screen failing when no location is specified

Bug #363066 reported by Samuel Buffet
Affects Status Importance Assigned to Milestone
Entertainer Media Center
Fix Released
Samuel Buffet

Bug Description

When no location is specified for weather forecast we have this Traceback :

Traceback (most recent call last):
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/", line 311, in handle_keyboard_event
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/", line 316, in handle_user_event
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/", line 335, in _handle_default
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/screens/", line 141, in handle_user_event
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/screens/", line 306, in _handle_select
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/", line 237, in move_to_new_screen
    screen = self.create_screen(screen_type, kwargs)
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/", line 230, in create_screen
    screen = self.screen_factory.generate_screen(screen_type, data)
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/screens/", line 77, in generate_screen
    return generator_methods[screen_type](kwargs)
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/screens/", line 186, in _generate_weather
    return WeatherScreen(**kwargs)
  File "/mnt/raid/Programmes/branches_entertainer/entertainer/entertainerlib/frontend/gui/screens/", line 43, in __init__
    day = forecasts[0]
IndexError: list index out of range

Related branches

Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

If no location is specified then forecasts should be None and forecasts[0] is nonsense because None is not a list.

Changed in entertainer:
assignee: nobody → samuel-buffet
status: New → Triaged
Changed in entertainer:
importance: Undecided → Medium
Changed in entertainer:
status: Triaged → In Progress
Paul Hummer (rockstar)
Changed in entertainer:
milestone: none → entertainer-0.5
status: In Progress → Fix Committed
Matt Layman (mblayman)
Changed in entertainer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.