[Tutor] Why does invalid syntax pop up?
dyoo at hkn.eecs.berkeley.edu
Thu Jul 7 22:58:46 CEST 2005
On Thu, 7 Jul 2005, Nathan Pinno wrote:
> Here is another error message:
> Traceback (most recent call last):
> File "D:\password.py", line 69, in ?
> NameError: name 'main_menu' is not defined
The error message is correct: there is no "main_menu()" function. There
is, however, a "main_menu_command()" function that's defined right at the
top. Did you mean that instead?
And just out of curiosity, when did you get this NameError message?
Before the SyntaxError, or after? The reason I ask is because if you're
still hitting SyntaxError, there should no be possible way for the program
to even get to NameError --- a SyntaxError is a show-stopper.
Is the SyntaxError still showing up? As far as I could tell, your code
looked fine from a syntactic point of view.
Best of wishes to you!
More information about the Tutor