Getting Error can't find '__main__' module in 'X'
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sun Jun 2 07:43:38 EDT 2013
On Sun, 02 Jun 2013 04:04:50 -0700, meakaakka wrote:
> Hey I am newbie in python.I have installed python 2.7.5 correctly.It is
> working fine but I am having some issues.I have set windows Enviroment
> variables.
Any particular environment variables? Shall we guess which ones?
> The problem is when I try to save my program in a
> folder(C:\Users\John\X)it shows that module error
Are you saying that you cannot save in that folder? Sounds like a
permission error, or maybe the folder doesn't exist. Have you tried
saving in that folder with another program? Can you see the folder in
Windows Explorer?
Or do you mean you CAN save in that folder, but... something else
happens? What? We could play guessing games all week, but it would be
better if you actually tell us exactly what is happening. You can see
exactly what happens, we can only see what you tell us. Tell us:
* Where is the file saved?
* What file name does it have?
* EXACTLY how you are trying to run the file.
* If you are trying to launch it from the command line, COPY AND PASTE
the EXACT command you are using.
* If you get an error, and it is in the console, COPY AND PASTE the EXACT
error message you get. ALL of it. Don't summarise, don't leave out bits
you think aren't important, don't retype it from memory, and especially
don't assume that because you know what the error is, we will magically
know too.
The error message will probably start with:
Traceback (most recent call last):
and then end with an exception type and error message, like:
NameError: name 'foo' is not defined
IndexError: list index out of range
SyntaxError: invalid syntax
or similar. Copy and paste the entire error message.
Once you have shown us these details, we might be able to help you, or at
least come back to you with more questions.
--
Steven
More information about the Python-list
mailing list