[New-bugs-announce] [issue13457] Display module name as string in `ImportError`

Ram Rachum report at bugs.python.org
Tue Nov 22 21:28:56 CET 2011

New submission from Ram Rachum <ram at rachum.com>:

Recently I was confronted with a mysterious error:

    ImportError: No module named datetime

Firther investigation revealed that the cause was a pickling problem that ran `__import__('datetime\r')`.

If `ImportError` would have shown the module name as a string, there would be no ambiguity:

    ImportError: No module named 'datetime\r'

components: Interpreter Core
messages: 148140
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Display module name as string in `ImportError`
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list