IMAGE_DIR not defined

Bug #591013 reported by Thangalin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Fix Released
Low
Andy Finch

Bug Description

THE PROBLEM
1. Right-click on an MP3 file in the "Project Files" tab.
2. Select File Properties

EXPECTED RESULTS
File Properties dialog appears.

ACTUAL RESULTS
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 3571, in on_FileProperties_activate
    FileProperties.frmFileproperties(file_item, form=self, project=self.project)
  File "/usr/lib/pymodules/python2.6/openshot/windows/FileProperties.py", line 49, in __init__
    pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(IMAGE_DIR, "AudioThumbnail.png"))
NameError: global name 'IMAGE_DIR' is not defined
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 3571, in on_FileProperties_activate
    FileProperties.frmFileproperties(file_item, form=self, project=self.project)
  File "/usr/lib/pymodules/python2.6/openshot/windows/FileProperties.py", line 49, in __init__
    pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(IMAGE_DIR, "AudioThumbnail.png"))
NameError: global name 'IMAGE_DIR' is not defined

QUICK FIX
1. sudo vi /usr/lib/pymodules/python2.6/openshot/windows/FileProperties.py
2. Add a line to initialize the variable:

    else:
      IMAGE_DIR = "/usr/share/pyshared/openshot/images/"

      #use the generic OpenShot audio thumbnail
      pixbuf = gtk.gdk.pixbuf_new_from_file(os.path.join(IMAGE_DIR, "AudioThumbnail.png"))

Obviously this is not the correct solution, but should give you an idea of the problem.

Revision history for this message
Olivier Girard (eolinwen) wrote :

Thanks a lot for having resolve this issue. After testing it will be included in the next version. Thanks again.

Changed in openshot:
status: New → Fix Released
milestone: none → 1.2.0
Andy Finch (fincha)
Changed in openshot:
status: Fix Released → Confirmed
moimael (moimael)
Changed in openshot:
importance: Undecided → Low
Andy Finch (fincha)
Changed in openshot:
assignee: nobody → Andy Finch (fincha)
status: Confirmed → In Progress
Revision history for this message
Andy Finch (fincha) wrote :

If we apply the patch from bug #586011, then this bug becomes invalid.

Revision history for this message
Thangalin (thangalin-deactivatedaccount) wrote :

Agreed; feel free to close.

Revision history for this message
Andy Finch (fincha) wrote :

Commit of fix for #586011 also fixes this issue.

Changed in openshot:
status: In Progress → Fix Committed
Andy Finch (fincha)
Changed in openshot:
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.