[Python-apps-team] Bug#766931: AttributeError: 'NoneType' if window moved with alt+stylus

George Shuklin amarao at desunote.ru
Mon Oct 27 00:12:30 UTC 2014


Package: mypaint
Version: 1.1.0-3
Severity: minor

If mypaint window moved by holding alt + stylus move, mypaint displays trace
(non-damaging), see below.

Steps to reproduce:

1. Attach wacom tablet to PC
2. Run mypaint
3. Hold Alt key.
4. Touch anywhere on canvas.

This bug does not appear if window moved by alt+mouse.

TRACE:

Traceback (most recent call last):
  File "/usr/share/mypaint/gui/document.py", line 76,
button_press_cb(self=<gui.document.Document object>, tdw=<TiledDrawWidget
object at 0x7fdf0886d460 (GtkEventBox at 0x207c8b0)>, event=<gtk.gdk.Event at
0x7fdf07e59328: GDK_BUTTON_PRESS x=577.78, y=356.24, button=1>)
            """
            result = self.modes.top.button_press_cb(tdw, event)
            self.__update_last_event_info(tdw, event)
  variables: {'event': ('local', <gtk.gdk.Event at 0x7fdf07e59328:
GDK_BUTTON_PRESS x=577.78, y=356.24, button=1>), 'tdw': ('local',
<TiledDrawWidget object at 0x7fdf0886d460 (GtkEventBox at 0x207c8b0)>),
'result': (None, []), 'self.modes.top.button_press_cb': ('local', <bound method
SwitchableFreehandMode.button_press_cb of
<gui.canvasevent.SwitchableFreehandMode object at 0x7fdf07ec8b90>>)}
  File "/usr/share/mypaint/gui/canvasevent.py", line 580,
button_press_cb(self=<gui.canvasevent.SwitchableFreehandMode object>,
tdw=<TiledDrawWidget object at 0x7fdf0886d460 (GtkEventBox at 0x207c8b0)>,
event=<gtk.gdk.Event at 0x7fdf07e59328: GDK_BUTTON_PRESS x=577.78, y=356.24,
button=1>)
            if action_name is not None:
                return self._dispatch_named_action(None, tdw, event,
action_name)
  variables: {'None': ('builtin', None), 'action_name': ('local',
u'ColorPickMode'), 'tdw': ('local', <TiledDrawWidget object at 0x7fdf0886d460
(GtkEventBox at 0x207c8b0)>), 'event': ('local', <gtk.gdk.Event at
0x7fdf07e59328: GDK_BUTTON_PRESS x=577.78, y=356.24, button=1>),
'self._dispatch_named_action': ('local', <bound method
SwitchableFreehandMode._dispatch_named_action of
<gui.canvasevent.SwitchableFreehandMode object at 0x7fdf07ec8b90>>)}
  File "/usr/share/mypaint/gui/canvasevent.py", line 647,
_dispatch_named_action(self=<gui.canvasevent.SwitchableFreehandMode object>,
win=None, tdw=<TiledDrawWidget object at 0x7fdf0886d460 (GtkEventBox at
0x207c8b0)>, event=<gtk.gdk.Event at 0x7fdf07e59328: GDK_BUTTON_PRESS x=577.78,
y=356.24, button=1>, action_name=u'ColorPickMode')
                else:
                    return mode.button_press_cb(tdw, event)
            elif handler_type == 'popup_state':
  variables: {'tdw': ('local', <TiledDrawWidget object at 0x7fdf0886d460
(GtkEventBox at 0x207c8b0)>), 'event': ('local', <gtk.gdk.Event at
0x7fdf07e59328: GDK_BUTTON_PRESS x=577.78, y=356.24, button=1>),
'mode.button_press_cb': ('local', <bound method ColorPickMode.button_press_cb
of <gui.colorpicker.ColorPickMode object at 0x7fdf05127850>>)}
  File "/usr/share/mypaint/gui/colorpicker.py", line 72,
button_press_cb(self=<gui.colorpicker.ColorPickMode object>,
tdw=<TiledDrawWidget object at 0x7fdf0886d460 (GtkEventBox at 0x207c8b0)>,
event=<gtk.gdk.Event at 0x7fdf07e59328: GDK_BUTTON_PRESS x=577.78, y=356.24,
button=1>)
            self._button_press_seen = True
            self.doc.app.pick_color_at_pointer(self.doc.tdw, self.PICK_SIZE)
            return super(ColorPickMode, self).button_press_cb(tdw, event)
AttributeError: 'NoneType' object has no attribute 'app'

wacom details:

Wacom Bamboo Connect Pen stylus         id: 12  type: STYLUS
Wacom Bamboo Connect Pen eraser         id: 13  type: ERASER



-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mypaint depends on:
ii  libatk1.0-0         2.14.0-1
ii  libc6               2.19-12
ii  libcairo2           1.14.0-2
ii  libfontconfig1      2.11.0-6.1
ii  libfreetype6        2.5.2-2
ii  libgcc1             1:4.9.1-19
ii  libgdk-pixbuf2.0-0  2.31.1-2+b1
ii  libglib2.0-0        2.42.0-2
ii  libgomp1            4.9.1-19
ii  libgtk2.0-0         2.24.25-1
ii  libjson0            0.11-4
ii  liblcms2-2          2.6-3+b2
ii  libpango1.0-0       1.36.8-2
ii  libpng12-0          1.2.50-2
ii  libpython2.7        2.7.8-11
ii  libstdc++6          4.9.1-19
ii  mypaint-data        1.1.0-3
ii  python              2.7.8-2
ii  python-gtk2         2.24.0-4
ii  python-numpy        1:1.8.2-2
ii  python2.7           2.7.8-11

Versions of packages mypaint recommends:
ii  shared-mime-info  1.3-1

Versions of packages mypaint suggests:
pn  mypaint-data-extras  <none>

-- debconf-show failed



More information about the Python-apps-team mailing list