[pyxpcom] Problems with getService
by Stefan Farestam other posts by this author
Aug 16 2005 8:42PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] pyxpcom on mac, anyone?
|
RE: [pyxpcom] Problems with getService
I just compiled the latest version of pyxpcom on windows. When
testing it I found that using pyxpcom through mozilla worked
fine, but when called independently through either regxpcom
or by invoking python it generated an error. I isolated the problem
to being able to create a service. In particular, the following
piece used to work fine, but now generates an error:
----- code
import xpcom, xpcom.components
classes = xpcom.components.classes
interfaces = xpcom.components.interfaces
RDFS_class = classes["@mozilla.org/rdf/rdf-service;1"]
RDFS = RDFS_class.getService(interfaces.nsIRDFService)
------------------------------------------------------
----- error
Traceback (most recent call last):
File "test.py", line 7, in ?
RDFS = RDFS_class.getService(interfaces.nsIRDFService)
File "D:\pymoz\lib\site-packages\xpcom\components.py", line 194, in getService
return serviceManager.getServiceByContractID(self.contractid, _get_good_iid(iid))
File "<XPCOMObject method 'getServiceByContractID'> ", line 3, in getServiceByContractID
xpcom.Exception: 0x-7ffbfeac (NS_ERROR_FACTORY_NOT_REGISTERED)
------------------------------------------------------
It appears as though xpcom is not initialized. Has something
changed recently in mozilla builds in the invocation of xpcom,
or do I have a build problem of some sorts?
Any ideas or pointers would be most appreciated,
Stefan
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Stefan Farestam
Mark Hammond
Stefan Farestam
Mark Hammond
Stefan Farestam
|