-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of sqlalchemy.case
causes TypeError: expected bytes, str found
#459
Comments
Hi, could you try impyla 0.17.0 ? It contains lots of bugfixes. |
I had the exact same error with Netezza as db. There seems to be difference in the behaviour of sqlalchemy 1.3.x and 1.4.x making some type casting uneccessary. This led to breaking change for the dialect (officially the Netezza driver nzpy is not yet compatibel with sqlalchemy 1.4.x). This might be the case here, too.
I hope this helps for further investigations. Might be related to #457 |
Just have time to test it. Sadly, v0.17.0 and the version from #457 suffers the same error.
Still have to use the cast workaround for now. |
Use of
sqlalchemy.case
causesTypeError: expected bytes, str found
.A minimal example:
it gives following error message:
Same code works for postgresql and mysql.
versions:
Python 3.8.8
impyla 'v0.16.3'
sqlalchemy '1.4.2'
I'm using a workaround to fix it for now: cast the result of
case
as string.Is there a better solution for this problem?
The text was updated successfully, but these errors were encountered: