This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients MichaelSapphire, eric.smith
Date 2020-06-19.23:37:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592609870.69.0.206621080991.issue41042@roundup.psfhosted.org>
In-reply-to
Content
You should just be using "import index". By using "import index.py", you're telling the interpreter to first import index, execute the code in it, then look for a sub-module named "py" (full name: index.py). Since no such sub-module exists, and index is not a package, you get the exception you're seeing.

It's like "import os.path": first import "os", then look for "path" inside of that.
History
Date User Action Args
2020-06-19 23:37:50eric.smithsetrecipients: + eric.smith, MichaelSapphire
2020-06-19 23:37:50eric.smithsetmessageid: <1592609870.69.0.206621080991.issue41042@roundup.psfhosted.org>
2020-06-19 23:37:50eric.smithlinkissue41042 messages
2020-06-19 23:37:50eric.smithcreate