Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When i add

import pynotify

and try to run my app i get

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk

with another example i don't get the error...

share|improve this question
    
The warning messages are not pynotify errors, but GTK warnings. Can you please paste more of your code? –  Rafał Cieślak Jul 5 '12 at 19:38
    
you can see all the code here github.com/Clepto/MangaR/blob/master/mangar/MangarWindow.py ... the problem occurs only when i uncomment the import pynotify. The function about notify is last –  Clepto Jul 5 '12 at 19:49

1 Answer 1

up vote 3 down vote accepted

You should only use pynotify if you are using Gtk2. If you are using Gtk3 (which is the default for Quickly), you would use from gi.repository import Notify.

share|improve this answer
    
do i have to change anything in the show_notification function in the end of the code? because i get: File "/home/chris/Projects/MangaR/mangar/mangar/MangarWindow.py", line 617, in show_notification n = Notify.Notification(title, body) TypeError: GObject.__init__() takes exactly 0 arguments (2 given) –  Clepto Jul 5 '12 at 20:23
    
i push the code in github! github.com/Clepto/MangaR/commit/… –  Clepto Jul 6 '12 at 6:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.