URL:
<http://gna.org/bugs/?18575>
Summary: Errors on draw, toolbar brush selection, and exit
with existing configuration
Project: MyPaint
Submitted by: marand
Submitted on: Sat Aug 27 01:51:47 2011
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: git (commit 796d220e)
Planned Release: None
Operating System: Debian testing (wheezy)
_______________________________________________________
Details:
This started happening sometime after commit bc526fa, seems to be caused by
the history dropdown feature (commit b8c2b63). Existing configs don't have
history_* brushes, which is causing errors when doing the following: clicking
the brush history expander next to the brush icon, at the end of a brush
stroke (after release), and when attempting to close MyPaint.
Doesn't happen on new configs, also doesn't happen if I rename the brushes
directory and let MyPaint generate a new one. If I copy the
./brushes/history_* files MyPaint generates in one of those cases into my old
brushes directory, errors quit occurring on the old configuration.
If it helps, the errors:
=== Brush history error ===
Traceback (most recent call last):
File "$HOME/files/local/src/mypaint-git/mypaint/gui/toolbar.py", line 202,
on_show_menu(no details)
for i, brush in enumerate(bm.history):
name =
brush.brushinfo.get_string_property("parent_brush_name")
if init:
variables: {'name': (None, []), 'brush': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/lib/brush.py", line 284,
get_string_property(no details)
def get_string_property(self, name):
return self.settings.get(name, None)
variables: {'None': ('builtin', None), 'self': (None, []), 'name': (None,
[])}
AttributeError: 'NoneType' object has no attribute 'get'
=== Stroke completion error ===
Traceback (most recent call last):
File "$HOME/files/local/src/mypaint-git/mypaint/gui/tileddrawwidget.py",
line 300, button_release_cb(no details)
for func in self._input_stroke_ended_observers:
func(event)
variables: {'event': (None, []), 'func': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/gui/brushmanager.py", line
516, input_stroke_ended_cb(no details)
for i, h in enumerate(self.history):
h_parent =
h.brushinfo.get_string_property("parent_brush_name")
# Possibly we should use a tighter equality check than this,
but
variables: {'h': (None, []), 'h_parent': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/lib/brush.py", line 284,
get_string_property(no details)
def get_string_property(self, name):
return self.settings.get(name, None)
variables: {'None': ('builtin', None), 'self': (None, []), 'name': (None,
[])}
AttributeError: 'NoneType' object has no attribute 'get'
=== Program exit error ===
Traceback (most recent call last):
File "$HOME/files/local/src/mypaint-git/mypaint/gui/drawwindow.py", line
861, quit_cb(no details)
self.app.doc.model.split_stroke()
self.app.save_gui_config() # FIXME: should do this periodically,
not only on quit
variables: {'self': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/gui/application.py", line
377, save_gui_config(no details)
gtk.accel_map_save(join(self.confpath, 'accelmap.conf'))
self.save_settings()
variables: {'self': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/gui/application.py", line
164, save_settings(self=<gui.application.Application instance>)
self.brushmanager.save_brushes_for_devices()
self.brushmanager.save_brush_history()
self.filehandler.save_scratchpad(self.scratchpad_filename)
variables: {'self.brushmanager.save_brush_history': ('local', <bound method
BrushManager.save_brush_history of <gui.brushmanager.BrushManager instance at
0xa5d0e4c>>)}
File "$HOME/files/local/src/mypaint-git/mypaint/gui/brushmanager.py", line
597, save_brush_history(no details)
if not brush.preview:
brush.load_preview()
brush.save()
variables: {'brush': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/gui/brushmanager.py", line
762, load_preview(no details)
"""Loads the brush preview as pixbuf into the brush."""
prefix = self.get_fileprefix()
variables: {'prefix': (None, []), 'self': (None, [])}
File "$HOME/files/local/src/mypaint-git/mypaint/gui/brushmanager.py", line
701, get_fileprefix(no details)
if not os.path.isfile(prefix + '.myb'):
raise IOError, 'brush "' + self.name + '" not found'
return prefix
variables: {'IOError': ('builtin', <type 'exceptions.IOError'>), 'self':
(None, [])}
IOError: brush "history_0" not found
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?18575>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs