← Back to team overview

openshot.developers team mailing list archive

[Bug 591013] Re: IMAGE_DIR not defined

 

Commit of fix for #586011 also fixes this issue.

** Changed in: openshot
       Status: In Progress => Fix Committed

-- 
IMAGE_DIR not defined
https://bugs.launchpad.net/bugs/591013
You received this bug notification because you are a member of OpenShot
Developers, which is subscribed to OpenShot Video Editor.

Status in OpenShot Video Editor: Fix Committed

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.





References