[issue14285] Traceback wrong on ImportError while executing a package

Marc Schlaich report at bugs.python.org
Tue Mar 13 07:50:36 CET 2012


New submission from Marc Schlaich <marc.schlaich at googlemail.com>:

It is very simple to reproduce this error. 
There is an executable package:

package/
    __init__.py
    __main__.py

The __init__ imports a missing module:

    import missing_module

And the __main__ imports from it:

    from . import missing_module

Now I get the following output which is not what I am expecting:

    C:\Python27\python.exe: No module named missing_module; 'package' is 
    a package and cannot be directly executed

----------
messages: 155574
nosy: ms4py
priority: normal
severity: normal
status: open
title: Traceback wrong on ImportError while executing a package
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14285>
_______________________________________


More information about the Python-bugs-list mailing list