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
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

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