From terminal:
File "index.py", line 41 def main(): ^ SyntaxError: invalid syntax
From App Engine dev server. I'm running 2.7.3rc2 on Debian:
msg = 'invalid syntax' offset = 3 print_file_and_line = None text = 'def main():\n'
Script:
def main(): # << here
run_wsgi_app(application)
if __name__=="__main__":
main()
This error is probably being caused by a syntax error higher up in the code, like a missing close paren.
For example the following code will give a SyntaxError in the same place as your code:
(
def main():
pass
If you are having a hard time tracking it down, post some of the code that comes earlier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With