SyntaxError: Invalid Syntax.

Fredrik Lundh fredrik at
Fri Nov 10 20:51:27 CET 2006

"ronrsr" <ronrsr at> wrote:

> the exact code that is triggering the error message is:
> zc = zsql.connect()

individual statements don't "trigger" syntax errors; they're compiler 
errors, and only
appear when do something that causes code to be compiled.

> exact error message:  SyntaxError:  Invalid Syntax

a complete syntax error usually includes a traceback:

Traceback (most recent call last):
  File "", line 1, in <module>
    import module
  File "", line 25
    if 1
SyntaxError: invalid syntax

what does the traceback look like in your case?


More information about the Python-list mailing list