[Idle-dev] Failure to import module

Terry Reedy tjreedy at udel.edu
Fri Jul 6 20:37:05 EDT 2018


On 7/4/2018 10:08 AM, tariah kennedy wrote:
> Hi there. Recently I created a module transaction.py and tried to import 
> it into another program but i received a ModuleNotFoundError.
> 
> Please help! I use a idle 3.6.2

IDLE-dev discusses changing IDLE for future cpython releases.  That 
includes discussion of IDLE bugs and fixes.  I doubt your issue 
qualifies and only passed it through moderation so I could post the 
following.

The first thing you should do is to run your importing program in python 
3.6.2 and see if you get the same exception. This will nearly always the 
case, and indicates that the problem is not with IDLE.

Questions about using Python should go elsewhere, such as python-list or 
possibly stackoverflow.  Problems importing one's own module are usually 
a user mistakes, from not understanding the import doc.  So the next 
thing to do is re-read it.

If and when you ask your question again, include the operating system, 
the complete path of both modules, the complete exception trackback, and 
the output of 'import sys; print(sys.modules)'.  If the problem only 
occurs with IDLE, include the sys.modules output both when running 
directly in python and when running through IDLE.

-- 
Terry Jan Reedy



More information about the IDLE-dev mailing list