Crash: Cannot import images in linetime

Bug #1012476 reported by Diego Estévez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
New
Undecided
Unassigned

Bug Description

OS: Ubuntu 12.04 (64bits)
Openshot Version: 1.4.2
libmlt Version: 0.7.6+git20120204-2

This happened everytime you add an image to a linetime. The bug is that my locate is in Spanish and gtk use " , " and not " . " to separate decimal numbers, the result is that "float(preferences.Settings.general["imported_image_length"])" ends in "float('7,0')" and not "float('7.0')" as it is expected in other regions.

The output error is:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openshot/windows/MainGTK.py", line 1160, in motion_cb
    self.motion_file_drag(wid, context, x, y, time)
  File "/usr/lib/pymodules/python2.7/openshot/windows/MainGTK.py", line 1216, in motion_file_drag
    self.new_clip_object = self.project.sequences[0].tracks[0].AddClip(file_name, "Gold", 0, float(0.0), float(file_length), file_object)
  File "/usr/lib/pymodules/python2.7/openshot/classes/track.py", line 63, in AddClip
    NewClip.end_time = NewClip.start_time + float(preferences.Settings.general["imported_image_length"])#7.0
ValueError: invalid literal for float(): 7,00

maybe this fix the problem:

float(preferences.Settings.general["imported_image_length"].replace(',','.'))

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

Try opening the preferences window and then closing it again.

Revision history for this message
Diego Estévez (dgmvecuador) wrote :

Andy Finch (fincha), yes but maybe the fix should not be when opening the preferences window.

Revision history for this message
Andy Finch (fincha) wrote : Re: [Openshot.bugs] [Bug 1012476] Re: Crash: Cannot import images in linetime

That isn't the fix, but by doing that it overrides the bad value in the
settings file.

On 13 Jun 2012 17:45, "Diego Estévez" <email address hidden> wrote:

> *** This bug is a duplicate of bug 923873 ***
> https://bugs.launchpad.net/bugs/923873
>
> Andy Finch (fincha), yes but maybe the fix should not be when opening
> the preferences window.
>
> --
> You received this bug notification because you are a member of OpenShot
> Bugs, which is subscribed to OpenShot Video Editor.
> https://bugs.launchpad.net/bugs/1012476
>
> Title:
> Crash: Cannot import images in linetime
>
> Status in OpenShot Video Editor:
> New
>
> Bug description:
> OS: Ubuntu 12.04 (64bits)
> Openshot Version: 1.4.2
> libmlt Version: 0.7.6+git20120204-2
>
> This happened everytime you add an image to a linetime. The bug is
> that my locate is in Spanish and gtk use " , " and not " . " to
> separate decimal numbers, the result is that
> "float(preferences.Settings.general["imported_image_length"])" ends in
> "float('7,0')" and not "float('7.0')" as it is expected in other
> regions.
>
> The output error is:
>
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.7/openshot/windows/MainGTK.py", line
> 1160, in motion_cb
> self.motion_file_drag(wid, context, x, y, time)
> File "/usr/lib/pymodules/python2.7/openshot/windows/MainGTK.py", line
> 1216, in motion_file_drag
> self.new_clip_object =
> self.project.sequences[0].tracks[0].AddClip(file_name, "Gold", 0,
> float(0.0), float(file_length), file_object)
> File "/usr/lib/pymodules/python2.7/openshot/classes/track.py", line 63,
> in AddClip
> NewClip.end_time = NewClip.start_time +
> float(preferences.Settings.general["imported_image_length"])#7.0
> ValueError: invalid literal for float(): 7,00
>
> maybe this fix the problem:
>
>
> float(preferences.Settings.general["imported_image_length"].replace(',','.'))
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openshot/+bug/1012476/+subscriptions
>
> --
> Mailing list: https://launchpad.net/~openshot.bugs
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~openshot.bugs
> More help : https://help.launchpad.net/ListHelp
>

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.