Message371911
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. |
|
Date |
User |
Action |
Args |
2020-06-19 23:37:50 | eric.smith | set | recipients:
+ eric.smith, MichaelSapphire |
2020-06-19 23:37:50 | eric.smith | set | messageid: <1592609870.69.0.206621080991.issue41042@roundup.psfhosted.org> |
2020-06-19 23:37:50 | eric.smith | link | issue41042 messages |
2020-06-19 23:37:50 | eric.smith | create | |
|