-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
read_sql fails with psycopg2 connection #7010
Comments
This is partly deliberate, and partly a bug:
|
Thanks @jorisvandenbossche. Regarding your first point, shouldn't the code be: engine = sqlalchemy.create_engine('postgresql://josh@some.remote.host.net:54321/some_remote_database')
connection = engine.raw_connection()
pd.read_sql(my_query, connection) ? Otherwise I get the error:
This answer on SO seems to suggest precisely that. |
No that should not be the case, so that is a bug (you should feed it the engine). Can you give a more detailed error message? The answer of stack overflow is correct for current stable version (0.13.1 and below), but not anymore for master. |
@jorisvandenbossche You are right. I just confirmed this. Passing an |
OK, nevertheless, thanks for reporting! |
I am going to leave this open for now, as the part bug should be solved (backwards incompatibility). Normally will be solved when I get all old tests running. |
Will be fixed in #6987 |
I am unable to run
read_sql
against a PostgreSQL database with the current master branch. This error only happens with master. If I switch back to pandas0.13.1
(stable) everything works again.For reference, I am using
psycopg2 2.5.2
frompip install
.Below is some example code:
The error that I get is:
I get the same error with
read_frame
The text was updated successfully, but these errors were encountered: