[Tutor] Python Error Message

Alan Gauld alan.gauld at yahoo.co.uk
Mon Jan 25 20:04:06 EST 2021


On 25/01/2021 20:24, Nirel Leitman via Tutor wrote:
> I keep getting this error message:
> C:\Users\leitm>python C:\Users\leitm\Desktop\AI\degrees.py "C:\Users\leitm\Desktop\AI\degrees.py\small"> C:\Users\leitm\AppData\Local\Programs\Python\Python39\python.exe:

The error says:
> can't find '__main__' module in 'C:\\Users\\leitm\\Desktop\\AI\\degrees.py' 

> Why can't my computer find my folder?

It evidently can, it is a main module that it says is missing not
that it can't find the file. It's looking in the file for main
and not finding it.

>   What do I need to change for my computer to read this?

It depends on what is in the file.
Can you show us the main code for degrees.py?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list