← Back to team overview

openshot.developers team mailing list archive

[Bug 874906] Re: can't import files more than one time

 

I don't see any reason why. In any case, it's more understandable to check if a variable is None instead of "None".
The issue happen when I import files from "Recently Used" folder.
For some reason

self.frmAddFiles.get_current_folder()

return None. It could be because "Recently Used" is not an actual folder and the library did not handle it probably.
Then the value was assigned to

preferences.Settings.app_state["import_folder"]

without checking.
This cause undesirable problem afterward since the check fail to invalidate the None value.
The patch only remove the double quotes around "None", so no harm done I think.
If needed, you could change it to 

if default_folder != None and default_folder != "None":

It can't be be bad to do more check.

Sincere

-- 
You received this bug notification because you are a member of OpenShot
Developers, which is subscribed to openshot in Ubuntu.
https://bugs.launchpad.net/bugs/874906

Title:
  can't import files more than one time

Status in “openshot” package in Ubuntu:
  Confirmed

Bug description:
  Ubuntu 11.10

  Launch openshot
  In the "Project Files" tab 
  Do "Import Files", select one or more files, click "Add"
  Then do it again.... the popup does'nt appear

  in a terminal I have this trace :
  project modified:  Added file
  state saved
  Traceback (most recent call last):
    File "/usr/lib/pymodules/python2.7/openshot/windows/MainGTK.py", line 4459, in on_mnuAddFile_activate
      self.import_files_dialog = AddFiles.frmAddFiles(form=self.form, project=self.project)
    File "/usr/lib/pymodules/python2.7/openshot/windows/AddFiles.py", line 47, in __init__
      self.frmAddFiles.set_current_folder(preferences.Settings.app_state["import_folder"])
  TypeError: Gtk.FileChooser.set_current_folder() argument 1 must be string, not None

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openshot/+bug/874906/+subscriptions


References