UnboundLocalError when opening a media file with unsupported file types inside

Bug #1211009 reported by Marten de Vries
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenTeacher
Fix Released
Low
Cas Widdershoven

Bug Description

Traceback (most recent call last):
  File "modules/org/openteacher/interfaces/qt/enterers/media/media.py", line 69, in selectionChanged
    self.setRightActiveItem()
  File "modules/org/openteacher/interfaces/qt/enterers/media/media.py", line 73, in setRightActiveItem
    self.enterWidget.setActiveItem(self.enterWidget.list["items"][self.currentIndex().row()])
  File "modules/org/openteacher/interfaces/qt/enterers/media/media.py", line 303, in setActiveItem
    self.mediaDisplay.showMedia(item["filename"], item["remote"], False)
  File "modules/org/openteacher/interfaces/qt/mediaDisplay/mediaDisplay.py", line 87, in showMedia
    chosenModule.showMedia(chosenModule.path(path, self.autoplay), self.mediaDisplay, autoplay)
UnboundLocalError: local variable 'chosenModule' referenced before assignment

Happens when I open a media file not generated on my computer which supports playing mp4 files while my phonon backend doesn't. Simply showing a nicer error message should be enough.

Tags: media
tags: added: media
Revision history for this message
Cas Widdershoven (caswiddershoven) wrote :

Fixed per revision 725

Changed in openteacher:
status: Triaged → Fix Committed
Revision history for this message
Marten de Vries (marten-de-vries) wrote :

Closing accordingly (I mostly use 'Fix released' instead of 'Fix committed' since the bug overview gets a bit messy otherwise. You can still look up the bugs if needed via the milestone it's linked to.)

Changed in openteacher:
milestone: none → 3.3
assignee: nobody → Cas Widdershoven (caswiddershoven)
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.