[pyxpcom] import xpcom.components gives NS_ERROR_NO_INTERFACE
by Philip Semanchuk other posts by this author
May 29 2008 6:56AM messages near this date
view in the new Beta List Site
Re: [pyxpcom] libpyloader and @executable_path
|
Re: [pyxpcom] import xpcom.components gives NS_ERROR_NO_INTERFACE (fixed)
Hi all,
I'm on OS X and I installed pyxpcom by compiling Moz 1.9 from source.
I'm close to getting it working, but I think something is missing from
my environment.
In python I can import xpcom and xpcom._xpcom successfully, but trying
to import something like xpcom.components fails with
NS_ERROR_NO_INTERFACE when trying to find nsIObserver.
I can see ~/mozilla/dist/idl/nsIObserver.idl exists but I don't know
what I have to do to get pyxpcom to find that (if that's even the
problem). Any suggestions on how to resolve this would be appreciated.
Thanks. My Python session follows.
Python 2.5.1 (r251:54863, Nov 17 2007, 21:19:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
> >> import xpcom
> >> import xpcom._xpcom
###!!! ASSERTION: Failed to write xpti manifest!: 'Error', file
xptiInterfaceInfoManager.cpp, line 1946
###!!! ASSERTION: Failed to write xpti manifest!: 'Error', file
xptiInterfaceInfoManager.cpp, line 1946
*** Registering components in: xpconnect
*** Registering components in: nsUCvMathModule
*** Registering components in: nsUConvModule
*** Registering components in: nsI18nModule
*** Registering components in: nsChardetModule
*** Registering components in: nsUniversalCharDetModule
*** Registering components in: necko
*** Registering components in: nsCookieModule
*** Registering components in: nsPermissionsModule
*** Registering components in: nsAuthModule
*** Registering components in: nsJarModule
*** Registering components in: ZipWriterModule
*** Registering components in: nsPrefModule
*** Registering components in: nsSecurityManagerModule
*** Registering components in: nsRDFModule
*** Registering components in: nsXPIntlModule
*** Registering components in: nsWindowDataSourceModule
*** Registering components in: nsParserModule
*** Registering components in: nsGfxModule
*** Registering components in: nsWidgetMacModule
*** Registering components in: nsImageLib2Module
*** Registering components in: nsIconDecoderModule
*** Registering components in: nsPluginModule
*** Registering components in: nsLayoutModule
*** Registering components in: docshell_provider
*** Registering components in: embedcomponents
*** Registering components in: Browser_Embedding_Module
*** Registering components in: nsCJVMManagerModule
*** Registering components in: appshell
*** Registering components in: nsTransactionManagerModule
*** Registering components in: nsComposerModule
*** Registering components in: nsChromeModule
*** Registering components in: application
*** Registering components in: nsFindComponent
*** Registering components in: Apprunner
*** Registering components in: CommandLineModule
*** Registering components in: mozStorageModule
*** Registering components in: nsPlacesModule
*** Registering components in: tkAutoCompleteModule
*** Registering components in: satchel
*** Registering components in: PKI
*** Registering components in: nsToolkitCompsModule
*** Registering components in: nsSoftwareUpdate
*** Registering components in: JavaScript_Debugger
*** Registering components in: BOOT
*** Registering components in: NSS
*** Registering components in: nsAutoConfigModule
*** Registering components in: mozSpellCheckerModule
WARNING: Couldn't register mComponentsDir: file
nsComponentManager.cpp, line 3276
The Python XPCOM loader is adding '/Library/Frameworks/
Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/
python' to sys.path
> >> import xpcom.components
Traceback (most recent call last):
File "<stdin> ", line 1, in <module>
File "/Users/me/mozilla/dist/bin/python/xpcom/components.py", line
231, in <module>
import shutdown
File "/Users/me/mozilla/dist/bin/python/xpcom/shutdown.py", line
51, in <module>
class _ShutdownObserver:
File "/Users/me/mozilla/dist/bin/python/xpcom/shutdown.py", line
52, in _ShutdownObserver
_com_interfaces_ = interfaces.nsIObserver
File "/Users/me/mozilla/dist/bin/python/xpcom/components.py", line
103, in __getattr__
return self._get_one(attr)
File "/Users/me/mozilla/dist/bin/python/xpcom/components.py", line
153, in _get_one
raise xpcom.COMException(nsError.NS_ERROR_NO_INTERFACE, "The
interface '%s' does not exist" % (name,))
xpcom.Exception: -2147467262 (-2147467262)
> >> import sys
> >> sys.path.append('/Users/me/mozilla/dist/bin/python/xpcom')
> >> import xpcom.components
Traceback (most recent call last):
File "<stdin> ", line 1, in <module>
File "/Users/me/mozilla/dist/bin/python/xpcom/components.py", line
231, in <module>
import shutdown
File "/Users/me/mozilla/dist/bin/python/xpcom/shutdown.py", line
51, in <module>
class _ShutdownObserver:
File "/Users/me/mozilla/dist/bin/python/xpcom/shutdown.py", line
52, in _ShutdownObserver
_com_interfaces_ = interfaces.nsIObserver
File "/Users/me/mozilla/dist/bin/python/xpcom/components.py", line
103, in __getattr__
return self._get_one(attr)
File "/Users/me/mozilla/dist/bin/python/xpcom/components.py", line
153, in _get_one
raise xpcom.COMException(nsError.NS_ERROR_NO_INTERFACE, "The
interface '%s' does not exist" % (name,))
xpcom.Exception: -2147467262 (-2147467262)
> >>
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Philip Semanchuk
Philip Semanchuk
Atul Varma
Philip Semanchuk
Atul Varma
Todd Whiteman
Philip Semanchuk
Todd Whiteman
Philip Semanchuk
Atul Varma
Philip Semanchuk
Atul Varma
Philip Semanchuk
|