-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG: AttributeError: 'Engine' object has no attribute 'cursor' #58949
Comments
Thanks for the report. Can you please post the full output of |
I got error |
either the output of I'm guessing that it (sqlalchemy version) might be lower than 2.0. pandas 2.2 increased the minimum sqlalchemy version supported to 2.0 |
You are correct. I will close and mark as resolved for future reference |
fwiw - there's an open issue discussing if the minimum supported sqlalchemy version can be reversed back to the 1.4.x series - #57049 |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
I use pandas method to_sql often. On sqlalchemy update 2.2.0 and beyond, I got following error AttributeError: 'Engine' object has no attribute 'cursor'. It seems, the interface has changed compared to previous versions.
Expected Behavior
I expect to load data on table 'mydb' or append in case it exists already and have compatible columns.
Installed Versions
INSTALLED VERSIONS
commit : d9cdd2e
python : 3.12.3.final.0
python-bits : 64
OS : Windows
OS-release : 11
Version : 10.0.22621
machine : AMD64
processor : Intel64 Family 6 Model 154 Stepping 4, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : pt_BR.cp1252
pandas : 2.2.2
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 69.2.0
pip : 24.0
Cython : None
pytest : 8.1.1
hypothesis : None
...
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: