-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
read_sql gives SQLAlchemy warning 'Could not instantiate type ...' #7380
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
Comments
@drastega Thanks for the report! Apart from the warning you see, is the table imported well? |
My table is imported well. After upgrading pandas to 0.14.0 I get also
|
@drastega Thanks for the answers. The warning you get is already reported and fixed (will be released in 0.14, see #7284, you can always get rid of this warning for now by installing openpyxl < 2.0). For the SAWarning, I suppose this has something to do with what is reported here (#6416 (comment)). When reading one table, a SQLAlchemy Could you inspect the schemes of your other tables if there is something that could trigger this warning? Or try to read in the others and see when it fails? |
@jorisvandenbossche
It was incorrectly created (using MySQL syntax) many years ago. After removing this table from my SQLite database everyting is working. |
@drastega Could you test the following:
If this runs without the warning? (not to say you should do it like this in your code, but if this works, we can fix it in out code) |
@drastega Aha, good to hear! But still, can you test the code snippet in my previous comment? (with the problematic table still in your database). |
@jorisvandenbossche your new code works without warnings even with my old |
Related SO question: http://stackoverflow.com/questions/24096330/sawarning-could-not-instantiate-type-class-sqlalchemy-sql-sqltypes-integer
When I run the code below
I get
The schema of my SQLite table:
P.S. Sorry if something is wrong. This is my first issue.
The text was updated successfully, but these errors were encountered: