[Bug 1198115] Re: Doesn't appear to play nicely with gi.repository

Christopher Lee 1198115 at bugs.launchpad.net
Mon Jul 8 09:44:31 UTC 2013


I've since learned that I should be using:
from gi.repository import Notify

Marked as invalid as I got it wrong.

** Changed in: notify-python (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to notify-python in Ubuntu.
https://bugs.launchpad.net/bugs/1198115

Title:
  Doesn't appear to play nicely with gi.repository

Status in “notify-python” package in Ubuntu:
  Invalid

Bug description:
  In a python terminal I do the following:

  >>> import pynotify;
  >>> from gi.repository import Gdk
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 27, in <module>
      from ._gi import _API, Repository
  ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))
  >>> 

  Or in the reverse:

  >>> from gi.repository import Gdk
  >>> import pynotify
  /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: cannot register existing type 'GdkWindow'
    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
  Segmentation fault (core dumped)

  I'm not sure what other details may be helpful but I'm happy to
  produce and provide anything that may be of further assistance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/notify-python/+bug/1198115/+subscriptions




More information about the foundations-bugs mailing list