I have a SQLAlchemy model with a Unicode column. I sometimes insert unicode values to it (u'Value'), but also sometimes insert ASCII strings. What is the best way to go about this? When I insert ASCII strings with special characters I get this warning:
SAWarning: Unicode type received non-unicode bind param value ...
How do I avoid this? What is the proper way to insert my different types of strings?
sqlalchemy
say useUnicode type
but you say useString(convert_unicode=True)
, i have same problem , but i don't think sqlalchemy solve withdisable warning
because it hasclean code
notdirty
. – Yand