New submission from Ram Rachum <[email protected]>:
I've been frustrated so many times by `ImportError: cannot import name foo`.
Right now I'm debugging some problem on a PAAS server (with no SSH access), and
the server returns a traceback of `cannot import name foo`, and I don't have
any idea what it means. It could mean that the file isn't there. It could mean
that there's a circular import problem. Sometimes it happens when you go over
Windows XP's path length limit!
Please provide a useful explanation, like this:
ImportError: Cannot import `foo` because no file foo.py* or folder foo
exists.
ImportError: Cannot import foo module because no __init__.py* file exists
in the foo folder.
ImportError: Cannot import foo because of a circular import problem with
bar.
ImportError: Cannot import foo because the foo module file's path is bigger
than Windows XP's path length limit.
Etcetera for any other reason that might cause an `ImportError`.
----------
components: Interpreter Core
messages: 140614
nosy: cool-RR
priority: normal
severity: normal
status: open
title: More detailed `ImportError` messages
versions: Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12583>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com