caught in the import web again

Ben Finney ben+python at
Sun Nov 16 00:43:02 CET 2014

"Charles T. Smith" < at> writes:

> Now, I'm getting these errors:

Please reduce the problem to a minimal, complete example demonstrating
the behaviour <URL:> so that you can show us exactly
what's happening.

>   AttributeError: 'module' object has no attribute ...
> (what is 'module'?)

The type of the object which doesn't have the attribute. It's saying
you're tring to access an attribute on a particular object, and that
object (which is of type ‘module’, hence it is a “'module' object”)
doesn't have that attribute.

> Is there a way to resolve this without having to restructure my code 
> every couple of days?

Not knowing what the actual problem is, it's difficult to say.

Please come up with a (contrived, if you like) minimal clear example of
what's happening – i.e. make it from scratch, without irrelevant parts
from the rest of your program, but ensure it still does what you're
confused by – and present it here.

 \          “It's a terrible paradox that most charities are driven by |
  `\     religious belief.… if you think altruism without Jesus is not |
_o__)          altruism, then you're a dick.” —Tim Minchin, 2010-11-28 |
Ben Finney

More information about the Python-list mailing list