Skip to content

Commit 550c110

Browse files
committed
fixed error handler syntax in SQLDatabase.to_sql
1 parent 9e63a80 commit 550c110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/sql.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ def to_sql(
13971397
try:
13981398
table.insert(chunksize, method=method)
13991399
except exc.SQLAlchemyError as err:
1400-
msg = '(1054, "Unknown column ' + "'inf' in 'field list'" + '")'
1400+
msg = "(1054, \"Unknown column 'inf' in 'field list'\")"
14011401
errText = str(err.orig)
14021402
if re.search(msg, errText):
14031403
raise ValueError("inf can not be used with MySQL") from err

0 commit comments

Comments
 (0)