ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pyxpcom
pyxpcom
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved