[mod_python] sporadic import errors...

Chris Anderson cva_ at yahoo.com
Mon Dec 17 13:49:47 EST 2001

--- Guido van Rossum <guido at python.org> wrote:
> Here's my analysis of the case.  Looking at the source code of os.py:
> def _get_exports_list(module):
>     try:
>         return list(module.__all__)
>     except AttributeError:
>         return [n for n in dir(module) if n[0] != '_']
> the AttributeError should be caught -- but it isn't!  I think this is
> because each Python interpreter instance initializes its own copy of
> the exceptions -- but store them in a global shared by all instances
> running in the same process!
> > the biggest problem i'm having (besides the error itself) is that i
> > can't figure out any way to tell which subinterpreter i am in when
> > these errors happen. i've poked through the documentation and
> > pythonrun.c to no avail.
> Can you try this with Python 2.2c1?  I think we've fixed it there. 
> If
> you can't try 2.2c1, try the patch to pythonrun.c from rev 2.143 to
> 2.144:

i didn't have an opportunity to try with 2.2c1, but the patch against
2.1.1 seems to have fixed the problem.

thanks much,


Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

More information about the Mod_python mailing list