Re: [pyxpcom] Can't use Python component inside xulrunner app
by Philip Semanchuk other posts by this author
Oct 31 2008 7:44AM messages near this date
view in the new Beta List Site
Re: [pyxpcom] Can't use Python component inside xulrunner app
|
[pyxpcom] Minimal Python for XPCOM use
On Oct 31, 2008, at 9:38 AM, Davi Ramos wrote:
> I just wrote a simple component (that uses Storm from Canonical) which
> stores some info into a database.
> The component works correctly when I put it into the "components"
> directory
> of xulrunner but something goes bad when I put it into the same path
> (myapp/components) in the application directory:
>
> ERROR:xpcom:Unhandled exception calling 'int8 loadModule(in
> nsISomething,
> out retval nsISomething);'
> Traceback (most recent call last):
> File "C:\dev\obj-xulrunner\dist\bin\python\xpcom\server\policy.py",
> line
> 277, in _CallMethod_
> return 0, func(*params)
> File "C:\dev\obj-xulrunner\dist\bin\python\xpcom\server\loader.py",
> line
> 92, in loadModule
> return self._getCOMModuleForLocation(aFile)
> File "C:\dev\obj-xulrunner\dist\bin\python\xpcom\server\loader.py",
> line
> 108, in _getCOMModuleForLocation
> py_mod = loader.load_module( module_name_in_sys, stuff )
> File "C:\Python25\Lib\ihooks.py", line 260, in load_module
> file, filename, info = stuff
> TypeError: 'NoneType' object is not iterable
>
> Error: uncaught exception: [Exception... "Component returned failure
> code:
> 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)
> [nsIJSCID.createInstance]"
> nsresult: "0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)" location:
> "JS
> frame :: chrome://testes/content/main.js :: <TOP_LEVEL> :: line 8"
> data:
> no]
>
> Does someone know what is wrong here?
Davi,
At the risk of telling you something you already know, I'll point out
that 'stuff' in line 260 of "C:\Python25\Lib\ihooks.py" is None. If I
were you, I'd have a look at that code and see if I could figure out
under what circumstances that's None. That's how I debugged a lot of
XPCOM/XulRunner problems. Sorry I can't be more specific but I don't
have any experience with debugging XPCOM questions on Windows.
Good luck
Philip
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Davi Ramos
Todd Whiteman
Philip Semanchuk
|