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

                 Summary: Save does not work
                 Project: MyPaint
            Submitted by: zrzz
            Submitted on: Tue 26 Mar 2013 02:03:52 PM GMT
                Severity: 4 - Important
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 39dc93363...
         Planned Release: None
        Operating System: Lubuntu 12.10/Compiz

    _______________________________________________________

Details:

Launch mypaint, press F2. Instead of saving, it will throw the exception:


Traceback (most recent call last):
  File "/mnt/tera/devel/src/mypaint/librarian-mypaint/gui/filehandling.py",
line 518, save_scrap_cb(self=<gui.filehandling.FileHandler object>,
action=<Action object at 0x3ec7690 (GtkAction at 0x3874650)>)
            prefix = self.get_scrap_prefix()
            self.app.filename = self.save_autoincrement_file(filename, prefix,
main_doc = True)
  File "/mnt/tera/devel/src/mypaint/librarian-mypaint/gui/filehandling.py",
line 577, save_autoincrement_file(self=<gui.filehandling.FileHandler object>,
filename=u'/devel/MyPaint/scrap004_a.ora', prefix=u'/devel/MyPaint/scrap',
main_doc=True)
            if main_doc:
                self.save_file(filename)
            else:
  variables: {'self.save_file': ('local', <bound method FileHandler.wrapper of
<gui.filehandling.FileHandler object at 0x3ec1c50>>), 'filename': ('local',
u'/devel/MyPaint/scrap004_a.ora')}
  File "/mnt/tera/devel/src/mypaint/librarian-mypaint/gui/drawwindow.py", line
60, wrapper(self=<gui.filehandling.FileHandler object>,
*args=(u'/devel/MyPaint/scrap004_a.ora',), **kwargs={})
            try:
                func(self, *args, **kwargs)
                # gtk main loop may be called in here...
  variables: {'self': ('local', <gui.filehandling.FileHandler object at
0x3ec1c50>), 'args': ('local', (u'/devel/MyPaint/scrap004_a.ora',)), 'func':
('local', <function save_file at 0x39dea28>), 'kwargs': ('local', {})}
  File "/mnt/tera/devel/src/mypaint/librarian-mypaint/gui/filehandling.py",
line 283, save_file(self=<gui.filehandling.FileHandler object>,
filename=u'/devel/MyPaint/scrap004_a.ora', export=False, **options={})
                thumbnail_pixbuf = self.doc.model.render_thumbnail()
            helpers.freedesktop_thumbnail(filename, thumbnail_pixbuf)
  variables: {'thumbnail_pixbuf': ('local', <Pixbuf object at 0x54eddc0
(GdkPixbuf at 0x5756590)>), 'helpers.freedesktop_thumbnail': ('global',
<function freedesktop_thumbnail at 0x367cf50>), 'filename': ('local',
u'/devel/MyPaint/scrap004_a.ora')}
  File "/mnt/tera/devel/src/mypaint/librarian-mypaint/lib/helpers.py", line
139, freedesktop_thumbnail(filename=u'/devel/MyPaint/scrap004_a.ora',
pixbuf=<Pixbuf object at 0x54eddc0 (GdkPixbuf at 0x5756590)>)
        uri = _filename2uri_freedesktop_canon(filename)
        file_hash = hashlib.md5(uri).hexdigest()
  variables: {'_filename2uri_freedesktop_canon': ('global', <function
_filename2uri_freedesktop_canon at 0x36812a8>), 'uri': (None, []), 'filename':
('local', u'/devel/MyPaint/scrap004_a.ora')}
  File "/mnt/tera/devel/src/mypaint/librarian-mypaint/lib/helpers.py", line
300, _filename2uri_freedesktop_canon(path=u'/devel/MyPaint/scrap004_a.ora',
encoding='UTF-8')
        path_bytes = path.encode(encoding)
        gfile = gio.File(path_bytes)
        return gfile.get_uri()
  variables: {'gio.File': ('global', <class 'gi.repository.Gio.File'>),
'path_bytes': ('local', '/devel/MyPaint/scrap004_a.ora'), 'gfile': (None,
[])}
TypeError: GInterface.__init__() takes exactly 0 arguments (1 given)


It seems that gio.File is no longer way to go. Here, for example,

https://mail.gnome.org/archives/python-hackers-list/2010-December/msg00007.html

people suggest use gio.file_new_for_path instead of gio.File(indeed, it does
work)





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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