wiki:PyXPCOMTroubleShooting

{{{>>> from xpcom import components Failed to get info for IID '{8458a740-d5dc-11d2-92fb-00e09805570f}' Traceback (most recent call last):

File "<stdin>", line 1, in ? File "xpcom/components.py", line 35, in ? File "xpcom/client/init.py", line 209, in init File "xpcom/client/init.py", line 279, in QueryInterface? File "xpcom/client/init.py", line 252, in _remember_interface_info File "xpcom/client/init.py", line 127, in BuildInterfaceInfo? File "xpcom/xpt.py", line 63, in init

xpcom.Exception: 0x-7fffbffb (NS_ERROR_FAILURE)}}}

Make sure you have your MOZILLA_FIVE_HOME set


>>> from xpcom import components
Could not import the Python XPCOM extension
exceptions.SystemError: dynamic module not initialized properly

Need to copy xpcom extension into /usr/lib/python2.4 symbolic linking doesn't work.


{{{>>> import xpcom

from xpcom import components

Fatal Python error: xpcom.cpp:461 object at 0xb7f0d3d4 has negative ref count -1209166877 Aborted (core dumped) }}} Make sure you're running the same Python that was in .mozconfig when you built xpcom. Need to rebuild Python and Mozilla.


{{{>>> from xpcom import components Failed to get info for IID '{8458a740-d5dc-11d2-92fb-00e09805570f}' Traceback (most recent call last):

File "<stdin>", line 1, in ? File "xpcom/components.py", line 35, in ?

manager = xpcom.client.Component(_xpcom.NS_GetGlobalComponentManager(), _xpcom.IID_nsIComponentManager)

File "xpcom/client/init.py", line 209, in init

self.QueryInterface?(iid)

File "xpcom/client/init.py", line 279, in QueryInterface?

self._remember_interface_info(iid)

File "xpcom/client/init.py", line 252, in _remember_interface_info

method_infos, getters, setters, constants = BuildInterfaceInfo?(iid)

File "xpcom/client/init.py", line 127, in BuildInterfaceInfo?

interface = xpt.Interface(iid)

File "xpcom/xpt.py", line 63, in init

item = iim.GetInfoForIID(iid)

xpcom.Exception: 0x-7fffbffb (NS_ERROR_FAILURE) }}}

Was picking up a bad copy of _xpcom

mv /home/djm/uoa/firefox/mozilla/dist/bin/python/ /home/djm/uoa/firefox/mozilla/dist/bin/python.orig