Package: openshot
Version: 1.4.0-1
Severity: normal

When running openshot for the first time, preferences are not saved and openshot
either hangs or crashes when trying.

How to reproduce:

Start openshot for the first time (i.e. remove any existing ~/.openshot/ 
directory).
Output is this:

== =
asjo@topper:~$ openshot

------------------------- ERROR 1 ------------------------------
Failed to import 'from openshot import main'
Error Message: cannot import name main
----------------------------------------------------------------
--------------------------------
   OpenShot (version 1.4.0)
--------------------------------

Detecting formats, codecs, and filters...
---
video_codecs:
  - a64multi
[... video codecs elided by reporter ...]
  - libxvid
...
---
audio_codecs:
  - aac
[... audio codecs elided by reporter ...]
  - libvorbis
...
---
formats:
  - a64
[... formats elided by reporter ...]
  - oss
...
state saved
== =

I then select Quit from the File menu; output is:

== =
on_mnuQuit1_activate called with self.GtkImageMenuItem
on_frmMain_destroy
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openshot/windows/MainGTK.py", line 1569, 
in on_frmMain_destroy
    self.settings.save_settings_to_xml()
  File "/usr/lib/pymodules/python2.7/openshot/windows/preferences.py", line 
506, in save_settings_to_xml
    self.write_to_settings_file(xmldoc)
  File "/usr/lib/pymodules/python2.7/openshot/windows/preferences.py", line 
518, in write_to_settings_file
    file.write(xmldoc.toxml("UTF-8"))
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 45, in toxml
    return self.toprettyxml("", "", encoding)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 57, in toprettyxml
    self.writexml(writer, "", indent, newl, encoding)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1747, in writexml
    node.writexml(writer, indent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 813, in writexml
    node.writexml(writer,indent+addindent,addindent,newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 813, in writexml
    node.writexml(writer,indent+addindent,addindent,newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 813, in writexml
    node.writexml(writer,indent+addindent,addindent,newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1036, in writexml
    _write_data(writer, self.data)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 295, in _write_data
    data = data.replace("&", "&amp;").replace("<", "&lt;"). \
AttributeError: 'int' object has no attribute 'replace'
41      ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
== =

It looks like there is a problem with an integer being passed to something
that expects a string.

This (monkey) patch:

--- preferences.py.orig 2011-10-10 22:58:46.493721277 +0200
+++ preferences.py      2011-10-10 23:12:55.869012026 +0200
@@ -489,7 +489,7 @@
                                                        
element[0].appendChild(txt)
                                                else:
                                                        # update existing text 
node
-                                                       
element[0].childNodes[0].data = section_dict[key]
+                                                       
element[0].childNodes[0].data = str(section_dict[key])
                                        else:
                                                #there is no matching element 
in the xml, 
                                                #we need to add one


Fixes the problem for me; then end of the output instead becomes:

== =
state saved
on_mnuQuit1_activate called with self.GtkImageMenuItem
on_frmMain_destroy
asjo@topper:~$ 
== =

Which is what I expected.

I don't know if it is a Python 2.7-thing or what it is...


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=da_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages openshot depends on:
ii  fontconfig           2.8.0-3    
ii  gtk2-engines-pixbuf  2.24.6-2   
ii  librsvg2-common      2.34.1-2   
ii  melt                 0.7.4-4    
ii  python               2.7.2-9    
ii  python-gtk2          2.24.0-2   
ii  python-httplib2      0.7.1-2    
ii  python-imaging       1.1.7-4    
ii  python-mlt3          0.7.4-4    
ii  python-pygoocanvas   0.14.1-1+b3
ii  python-support       1.0.14     
ii  python-xdg           0.19-3     

Versions of packages openshot recommends:
ii  frei0r-plugins  1.1.22git20091109-1.1
ii  openshot-doc    1.4.0-1              

Versions of packages openshot suggests:
ii  blender   <none>       
ii  inkscape  0.48.1-2.1+b1

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to