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
Hi, after upgrading to pytds 1.16.0 on python 3.9.18 I am getting "not enough arguments for format string" errors on any SQL statement that contains a '%' anywhere in the text (e.g. LIKE '%@%').
File "/usr/local/lib/python3.9/site-packages/pytds/cursor.py", line 322, in execute
self._session.execute(operation, params)
File "/usr/local/lib/python3.9/site-packages/pytds/tds_session.py", line 884, in execute
operation = operation % tuple(names)
TypeError: not enough arguments for format string
I'm stuck on 3.9 for...reasons. Not sure if that's part of the problem. Reverting to [email protected] fixes the problem.
The text was updated successfully, but these errors were encountered:
If you have % in your query and query has parameters you need to escape % it by doubling it, e.g.: LIKE '%%@%%'
If your query does not have parameters you don't need to escape %
Hi, after upgrading to pytds 1.16.0 on python 3.9.18 I am getting "not enough arguments for format string" errors on any SQL statement that contains a '%' anywhere in the text (e.g.
LIKE '%@%'
).I'm stuck on 3.9 for...reasons. Not sure if that's part of the problem. Reverting to [email protected] fixes the problem.
The text was updated successfully, but these errors were encountered: