I am having this issue don't know what is it issue
2023-08-15 22:10:48 sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT player_name, player_position\nFROM players\nJOIN clubs ON players.player_cl' at line 6")
2023-08-15 22:10:48 [SQL: SELECT COUNT(*) AS num_players
2023-08-15 22:10:48 FROM players
2023-08-15 22:10:48 JOIN clubs ON players.player_club_id = clubs.club_id
2023-08-15 22:10:48 WHERE clubs.club_name = 'Arsenal FC';
2023-08-15 22:10:48
2023-08-15 22:10:48 SELECT player_name, player_position
2023-08-15 22:10:48 FROM players
2023-08-15 22:10:48 JOIN clubs ON players.player_club_id = clubs.club_id
2023-08-15 22:10:48 WHERE clubs.club_name = 'Arsenal FC'
2023-08-15 22:10:48 LIMIT 5;]
2023-08-15 22:10:48 (Background on this error at: https://sqlalche.me/e/20/f405)
2023-08-15 22:10:48 192.168.112.5 - - [15/Aug/2023 15:10:48] "POST /chat HTTP/1.0" 500 -
with code to create index
sql_engine = get_sql_engine(env)
sql_database = SQLDatabase(sql_engine)
builder = SQLContextContainerBuilder(sql_database)
context_builder = builder.build_context_container()
service_context = ServiceContext.from_defaults(llm=api.llm)
index = GPTSQLStructStoreIndex([],
sql_database=sql_database,
sql_context_container=context_builder,
service_context=service_context)
I ran the query both work fine.
Have you faced it before?