You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
In Cursor -> execute(), while running a query that contains just comment, it causes an IndexError exception
Example query>> --comment
Error: IndexError: tuple index out of range
File "/Users/sanjeevbhatt/github/python-spanner-dev/google/cloud/spanner_dbapi/parse_utils.py", line 354, in ensure_where_clause
if any(isinstance(token, sqlparse.sql.Where) for token in sqlparse.parse(sql)[0]):
Note: Go cli returns “Error: Invalid Statement”
Environment details
Python version: 3.12.4
pip version: 24.1
google-cloud-spanner version: 3.47.0
Code example
query = "--comment"
cursor.execute(query)
Stack trace
Error: IndexError: tuple index out of range
File "/Users/sanjeevbhatt/github/python-spanner-dev/google/cloud/spanner_dbapi/parse_utils.py", line 354, in ensure_where_clause
if any(isinstance(token, sqlparse.sql.Where) for token in sqlparse.parse(sql)[0]):