From 11ee4c59c2ff2d2dcb0f1b6b815eb7e951390fe6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 22 May 2023 19:09:31 -0400 Subject: [PATCH] attempt to clarify sentinel mismatch message Fixes: #9822 Change-Id: Idd5d62e14e3018da939a985a306591d6898a397f --- lib/sqlalchemy/engine/default.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 48f5de725f..0d61e2a9bc 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -904,8 +904,11 @@ class DefaultDialect(Dialect): "found. " "There may be a mismatch between the datatype " "passed to the DBAPI driver vs. that which it " - "returns in a result row. Try using a different " - "datatype, such as integer" + "returns in a result row. Ensure the given " + "Python value matches the expected result type " + "*exactly*, taking care to not rely upon implicit " + "conversions which may occur such as when using " + "strings in place of UUID or integer values, etc. " ) from ke result.extend(ordered_rows) -- 2.47.3