Sybase ProgrammingError when checking unicode_for_unicode
Issue #2299
resolved
Using an older Sybase database (ASA 9, I think), line 234 in engine/default.py was raising a ProgrammingError:
unicode_for_unicode = check_unicode(sqltypes.Unicode(60))
I am running a sqlalchemy 0.7.2 port on FreeBSD.
I fixed it by catching the exception and returning False in the check_unicode function:
+++ engine/default.py 2011-10-12 13:43:38.000000000 -0700
@@ -224,6 +224,8 @@
row = cursor.fetchone()
return isinstance(row[0](0), unicode)
+ except self.dbapi.ProgrammingError:
+ return False
finally:
cursor.close()
Comments (2)
-
repo owner -
repo owner - removed milestone
Removing milestone: 0.7.3 (automated comment)
- Log in to comment
I have a generalized version of that + a test committed in f1eea63468d8e5d84edceb2b0028984e5917dde0