help running python in a limited interpreted environment

Nick Coghlan ncoghlan at
Fri Dec 3 13:56:26 CET 2004

Mike wrote:
> AttributeError: 'module' object has no attribute 'xxx'
> We know the calling script finds the necessary modules, and the
> attribute clearly appears in the module's .py file.
> Can anyone tell me what the problem is or if what we're trying to do is
> not possible?  Is there something in addition to the .dll that needs to
> be present?

Are there any circular imports in the scripts (e.g. A imports B which imports C 
which imports A)? This error message is sometimes seen when attempting to access 
attributes of a module which is still in the process of being imported.

There are a couple of bug reports on Source Forge about it - it hasn't been 
fixed yet, mainly because it's a damn hard problem in need of a solution that is 
still to be found ;)

The simplest resolution is to find a way to break the circularity (usually by 
moving the code responsible for the circularity to a different - possibly new - 

If you don't have any circular imports, then I'm out of ideas :)


More information about the Python-list mailing list