Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL errors #22

Open
Blotz opened this issue Mar 6, 2022 · 1 comment
Open

SQL errors #22

Blotz opened this issue Mar 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Blotz
Copy link
Contributor

Blotz commented Mar 6, 2022

inert    | [06/Mar/2022 14:26:06] ERROR [discord_bot.sqlHandler.execute:85] 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE guild_id=950036111848267786' at line 1
inert    | Traceback (most recent call last):
inert    |   File "/root/.local/lib/python3.9/site-packages/mysql/connector/connection_cext.py", line 523, in cmd_query
inert    |     self._cmysql.query(query,
inert    | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE guild_id=950036111848267786' at line 1
inert    | 
inert    | During handling of the above exception, another exception occurred:
inert    | 
inert    | Traceback (most recent call last):
inert    |   File "/code/src/discord_bot/sqlHandler.py", line 81, in execute
inert    |     c.execute(sql, params)
inert    |   File "/root/.local/lib/python3.9/site-packages/mysql/connector/cursor_cext.py", line 269, in execute
inert    |     result = self._cnx.cmd_query(stmt, raw=self._raw,
inert    |   File "/root/.local/lib/python3.9/site-packages/mysql/connector/connection_cext.py", line 528, in cmd_query
inert    |     raise errors.get_mysql_exception(exc.errno, msg=exc.msg,
inert    | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE guild_id=950036111848267786' at line 1```
SQL Code has mistakes and errors
@Blotz Blotz added the bug Something isn't working label Mar 6, 2022
@Blotz
Copy link
Contributor Author

Blotz commented Jun 22, 2022

implementing pytest-mysql to catch these errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant