[New-bugs-announce] [issue41042] import searches for package even after file was found successfully

Michael J. report at bugs.python.org
Fri Jun 19 17:06:22 EDT 2020


New submission from Michael J. <mpj at usfamily.net>:

Hello,
Earlier today, I was developing a program and I wanted to check its variables after it finished running. Simply going into a terminal, entering my program's directory, and executing "python3 index.py" would return control to the command line before I would have a chance to examine the data, so I ran "python3", got to the shell, and then imported my file.
My script executed, but after it finished, the intepreter raised a "ModuleNotFoundError: No module named 'index.py'; 'index' is not a package."
Is this supposed to happen after the interpreter finishes importing a file?
Thanks,
Michael

----------
components: Interpreter Core
messages: 371902
nosy: MichaelSapphire
priority: normal
severity: normal
status: open
title: import searches for package even after file was found successfully
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41042>
_______________________________________


More information about the New-bugs-announce mailing list