Closed mrmichaelrb closed 1 year ago
SQLAlchemy 1.4 is not currently supported, refer to #818.
If you install aiomysql[sa]
it will limit the SQLAlchemy version to a supported one.
If you can reproduce this with SQLAlchemy 1.3, please also provide a code example.
as I'm reading this again - it looks like your issue is with asyncmy
, not aiomysql
.
asyncmy is a separate project, not related to aiomysql.
Describe the bug
The following type of query works fine with normal sync SQLAlchemy engine/connection/execute, but throws a TypeError exception "Argument 'val' has incorrect type (expected tuple, got list)" when using mysql+aiomysql and async engine/connection/execute:
SELECT column1, column2 FROM table1 UNION SELECT column1, column2 FROM table2
To Reproduce
Query a MySQL database using SQLAlchemy with two SELECT statements combined with a UNION operator.
Expected behavior
When using a UNION operator, an async query should return the same results as a sync query, instead of throwing an exception.
Logs/tracebacks
Python Version
aiomysql Version
PyMySQL Version
SQLAlchemy Version
OS
Windows [Version 10.0.19044.1889]
Database type and version
Additional context
No response
Code of Conduct