Skip to content
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

'str' object has no attribute '_execute_on_connection' #102

Open
posidonius opened this issue Feb 1, 2023 · 8 comments
Open

'str' object has no attribute '_execute_on_connection' #102

posidonius opened this issue Feb 1, 2023 · 8 comments

Comments

@posidonius
Copy link

A few days ago I started getting these error messages when trying to run sqldf :

AttributeError: 'str' object has no attribute '_execute_on_connection'

sqlalchemy.exc.ObjectNotExecutableError: Not an executable object

The error message prints out the query string I'm trying to use. It doesn't want to execute the query because it's a string, but that's how I've been using sqldf now for over a year.

There's nothing wrong with the query itself. And I didn't change any code as far as I know, so I'm not sure why this broke.

I tried upgrading some packages and that didn't help. Versions installed:

Python 3.10.9
pandasql==0.7.3
 - pandas [required: Any, installed: 1.5.3]
 - sqlalchemy [required: Any, installed: 2.0.0]
@hrshdhgd
Copy link

hrshdhgd commented Feb 2, 2023

I experienced this too! (python 3.9)

As a temporary fix, I downgraded SQLAlchemy to a prior version (1.4.46) and everything worked gain.

@posidonius
Copy link
Author

As a temporary fix, I downgraded SQLAlchemy to a prior version (1.4.46) and everything worked gain.

Thanks for your help; that restores functionality. Does this problem eventually get solved with a patch of pandasql?

@hrshdhgd
Copy link

hrshdhgd commented Feb 5, 2023

That's my assumption. Depends on the authors of the project.

@posidonius
Copy link
Author

There hasn't been a commit since 2017 so what's the likelihood of that?

@hrshdhgd
Copy link

hrshdhgd commented Feb 6, 2023

Unfortunately, I'd say bleak. unless there is a PR from a non contributor.

@posidonius
Copy link
Author

There's PR #100 from contributor minikill so hopefully there's someone here to merge it.

@cmungall
Copy link

That PR doesn't actually fix the issue it just forces use of 1.x

@hrshdhgd
Copy link

If you want to use SQLAlchemy v2.x, I think merging my PR will resolve this and 2 other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants