[Th] python-pynotify - object has no attribute attach_to_status_icon

Lukasz Kies kiesiu at kiesiu.com
Sun Mar 15 15:22:35 CET 2009


Dear All,

When I try to use 'attach_to_status_icon' method from libnotify in
python I receive:
[kiesiu at beth Desktop]$ ./statusicon-notification.py
Traceback (most recent call last):
  File "./statusicon-notification.py", line 17, in <module>
    notification.attach_to_status_icon(icon)
AttributeError: 'pynotify.Notification' object has no attribute
'attach_to_status_icon'

I found that during build process of python-pynotify, pynotify.c is
not regenerated. When I remove this file I received:
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"pynotify-python\"
-DDATADIR=\"/usr/local/share\" -DLIBDIR=\"/usr/local/lib\"
-I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/python2.6 -g -O2 -MT pynotifymodule.lo -MD -MP -MF
.deps/pynotifymodule.Tpo -c pynotifymodule.c  -fPIC -DPIC -o
.libs/pynotifymodule.o
(cd . \
	 && /usr/bin/python /usr/share/pygobject/2.0/codegen/codegen.py \
		--register /usr/share/pygtk/2.0/defs/gtk-types.defs \
		--register /usr/share/pygtk/2.0/defs/gdk-types.defs \
	    --override pynotify.override \
	    --prefix pypynotify pynotify.defs) > gen-pynotify.c \
	 && cp gen-pynotify.c pynotify.c \
	 && rm -f gen-pynotify.c
/usr/bin/python: can't open file
'/usr/share/pygobject/2.0/codegen/codegen.py': [Errno 2] No such file
or directory
make[2]: *** [pynotify.c] Error 2

We don't add *.py files (only *.py[co]) to packages thus configure
script cannot find correct file and pynotify.c cannot be regenerated.

Please find attached patch to python-pynotify source and patch on SPEC file.
It builds on i686 and works fine to me. Please someone with rw access
to CVS add it and if possible STBR.

Regards,
Lukasz Kies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-pynotify-codegen.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
Url : /mailman/pipermail/pld-devel-en/attachments/20090315/a1502247/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-pynotify.patch
Type: text/x-patch
Size: 964 bytes
Desc: not available
Url : /mailman/pipermail/pld-devel-en/attachments/20090315/a1502247/attachment-0001.bin 


More information about the pld-devel-en mailing list