import types fails

Tim Peters at
Thu Aug 22 05:43:36 CEST 2002

[Greg Fortune]
> A buddy and I have ended up with some code that causes a line like
> import types
> or
> from types import DictType
> to fail.  Failure in this case means an apparent deadlock.  The
> import line executes, but never returns.  This only occurs in a
> specific instance while using a couple of third-party libraries so
> I need to know what I can do to trace down the problem in the libraries.

First run python with -vv and stare at the output.  With the -vv switch,
Python displays a detailed account of (among other things) how imports get
satisfied.  It sounds like, in this case, you're not importing from
the standard library at all, in which case the cause of the problem will be
found in whatever thing named "types" *is* getting imported.

More information about the Python-list mailing list