[Pyxpcomext] ImportError with _Py_ZeroStruct in C extension

Todd Whiteman twhitema at yahoo.com.au
Sun Feb 7 08:14:13 PST 2010

On 10-02-06 04:10 PM, William Cauchois wrote:
> getting a really weird error. The traceback looks like this:
> > ...
> >  File 
> "/home/toddw/src/pyxpcomext/src/build/pythonext at mozdev.org/python/lib/python2.6/ihooks.py 
> <http://pythonext@mozdev.org/python/lib/python2.6/ihooks.py>", line 
> 170, in load_source
> >  File "/home/phyrephox/Code/reform/reformFF/components/reformpy.py", 
> line 52, in <module>
> >    from reformServe import handlers,State,nodes,align
> >  File 
> "/home/phyrephox/.mozilla/firefox/3tn4oxjv.reform/extensions/pythonext at mozdev.org/pylib/reformServe/handlers.py 
> <http://pythonext@mozdev.org/pylib/reformServe/handlers.py>", line 2, 
> in <module>
> >    import time, cjson, string, cgi, nodes, State
> > ImportError: 
> /home/phyrephox/.mozilla/firefox/3tn4oxjv.reform/extensions/pythonext at mozdev.org/pylib/reformServe/cjson.so 
> <http://pythonext@mozdev.org/pylib/reformServe/cjson.so>: undefined 
> symbol: _Py_ZeroStruct
> I took special care to build a UCS2 Python and use that to build 
> cjson, since I'm on Ubuntu 9.10 which is UCS4 by default. Another 
> funny thing is that my colleague can use the exact same copy of 
> cjson.so on Ubuntu 9.10 and have it work for him. We spent a lot of 
> time trying figure out how our systems were different, but couldn't 
> come up with anything substantial. I'm not sure what other steps to 
> take to debug this issue. Does anyone have any ideas?

Hi Bill,

Another thing to check is the architecture (32 or 64 bit), as you will 
not be able to load a 64-bit Python library if the Python is built as 
32-bit (and vice versa). You can check with:

~/.mozilla/firefox/3tn4oxjv.reform/extensions/pythonext at mozdev.org/pylib/xpcom/_xpcom.so
~/.mozilla/firefox/3tn4oxjv.reform/extensions/pythonext at mozdev.org/pylib/reformServe/cjson.so


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mozdev.org/pipermail/pyxpcomext/attachments/20100207/885d7be2/attachment.html>

More information about the Pyxpcomext mailing list