-
-
Notifications
You must be signed in to change notification settings - Fork 19k
Open
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_query
Description
Trying to use read_sql_table on an instance without SQLAlchemy installed gives a confusing error message:
NotImplementedError: read_sql_table only supported for SQLAlchemy connectable.
The issue is that _is_sqlalchemy_connectable
returns false if SQLAlchemy is not installed. My suggestion is to raise an error stating that SQLAlchemy is required by trying to import it directly in read_sql_table or extending the error message to say that SQLAlchemy is required. I don't know the internals and what might go wrong, but one way would be to not catch the ImportError...
Lines 308 to 311 in 49c7791
if not _is_sqlalchemy_connectable(con): | |
raise NotImplementedError( | |
"read_sql_table only supported for SQLAlchemy connectable." | |
) |
Metadata
Metadata
Assignees
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_query