URL:
  <http://gna.org/bugs/?17536>

                 Summary: GIMP-MyPaint ORA export tracebacks if layer has
non-ascii character in name
                 Project: MyPaint
            Submitted by: griatch
            Submitted on: Wed 19 Jan 2011 08:25:16 PM GMT
                Severity: 4 - Important
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: GIT
         Planned Release: None
        Operating System: Linux Debian SID

    _______________________________________________________

Details:

Saving an ORA image in GIMP containing a layer named using non-ascii
character will cause a traceback in MyPaint. Also the GIMP ORA plugin will
fail to re-load the previously saved image. 

Example: 
In GIMP, use the text tool to create a text string "©test" (copyright sign).
The layer will automatically be named the same. Save as ORA. This seems to
work, but neither GIMP nor MyPaint can now load the image. 

This is a *very* dangerous bug especially since adding copyright information
is usually the last thing you do (e.g. in a watermark); it can at this time
make a finished image impossible to open again.


Traceback from MyPaint follows: 
------------------------------------

Traceback (most recent call last):
  File "/home/samreg/Progs/mypaint/mypaint-trunk/gui/filehandling.py", line
308, open_cb(no details)
                    dialog.hide()
                    self.open_file(dialog.get_filename().decode('utf-8'))
            finally:
  variables: {'decode': (None, []), 'self': (None, []), 'dialog': (None,
[])}
  File "/home/samreg/Progs/mypaint/mypaint-trunk/gui/drawwindow.py", line 43,
wrapper(self=<gui.filehandling.FileHandler object>,
*args=(u'/home/samreg/Art/wip/RedApplesLieHand/RedApplesLieHand.ora',),
**kwargs={})
            try:
                func(self, *args, **kwargs)
            finally:
  variables: {'self': ('local', <gui.filehandling.FileHandler object at
0x9580d0c>), 'args': ('local',
(u'/home/samreg/Art/wip/RedApplesLieHand/RedApplesLieHand.ora',)), 'func':
('local', <function open_file at 0x92c6304>), 'kwargs': ('local', {})}
  File "/home/samreg/Progs/mypaint/mypaint-trunk/gui/filehandling.py", line
229, open_file(no details)
            try:
                self.doc.model.load(filename)
            except document.SaveLoadError, e:
  variables: {'self': (None, []), 'filename': (None, [])}
  File "/home/samreg/Progs/mypaint/mypaint-trunk/lib/document.py", line 284,
load(no details)
            try:
                load(filename)
            except gobject.GError, e:
  variables: {'load': (None, []), 'filename': (None, [])}
  File "/home/samreg/Progs/mypaint/mypaint-trunk/lib/document.py", line 503,
load_ora(self=<lib.document.Document instance>,
filename=u'/home/samreg/Art/wip/RedApplesLieHand/RedApplesLieHand.ora')
                    continue
                pixbuf = get_pixbuf(src)
                name = a.get('name', '')
  variables: {'src': ('local', u'data/\xa9test.png'), 'get_pixbuf': ('local',
<function get_pixbuf at 0xde682cc>), 'pixbuf': ('local', <gtk.gdk.Pixbuf
object at 0x2cc87504 (GdkPixbuf at 0xb0415ba0)>)}
  File "/home/samreg/Progs/mypaint/mypaint-trunk/lib/document.py", line 460,
get_pixbuf(filename=u'data/\xa9test.png')
                f = open(tmp, 'wb')
                f.write(z.read(filename))
                f.close()
  variables: {'z.read': ('local', <bound method ZipFile.read of
<zipfile.ZipFile instance at 0x187da22c>>), 'f.write': ('local', <built-in
method write of file object at 0x1fb23860>), 'filename': ('local',
u'data/\xa9test.png')}
  File "/usr/lib/python2.6/zipfile.py", line 834, read(no details)
            """Return file bytes (as a string) for name."""
            return self.open(name, "r", pwd).read()
  variables: {'read': (None, []), 'self': (None, []), 'pwd': (None, []),
'name': (None, [])}
  File "/usr/lib/python2.6/zipfile.py", line 857, open(no details)
                # Get info object for name
                zinfo = self.getinfo(name)
  variables: {'self': (None, []), 'name': (None, []), 'zinfo': (None, [])}
  File "/usr/lib/python2.6/zipfile.py", line 824, getinfo(no details)
                raise KeyError(
                    'There is no item named %r in the archive' % name)
  variables: {'name': (None, [])}
KeyError: "There is no item named u'data/\\xa9test.png' in the archive"




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17536>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs

Reply via email to