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

SQLAlchemy 0 queries even for Flask-SQLAlchemy #78

Closed
ducu opened this issue Mar 13, 2015 · 4 comments
Closed

SQLAlchemy 0 queries even for Flask-SQLAlchemy #78

ducu opened this issue Mar 13, 2015 · 4 comments

Comments

@ducu
Copy link

ducu commented Mar 13, 2015

Anyone else experiencing this?
Meanwhile I'll stick to SQLALCHEMY_ECHO = True, too bad, the toolbar is looking good and all other panels are working but I'm only interested in the queries.

@mgood
Copy link
Contributor

mgood commented Apr 15, 2015

Are you running the app in "debug" mode? (You can look for DEBUG in the Config panel.)

Flask-SQLAlchemy captures queries in debug mode by default, but if that is false, you'll need to also set the SQLALCHEMY_RECORD_QUERIES = True in your config. See: http://flask-sqlalchemy.pocoo.org/2.0/api/#flask.ext.sqlalchemy.get_debug_queries

I know that's not obvious, so I'm working on a patch that will display better help in the SQLAlchemy panel if it notices common problems that would prevent capturing the SQL queries.

If DEBUG or SQLALCHEMY_RECORD_QUERIES are true, then maybe this is a different issue, and I'd need a little more info to help debug.

@mgood
Copy link
Contributor

mgood commented Apr 17, 2015

I've pushed an update 61d1fc2 that will detect common setup issues with Flask-SQLAlchemy and display steps to fix the query recording. I'm assuming you're just missing the SQLALCHEMY_RECORD_QUERIES, which this update will detect.

If you have another issue please reopen with more details.

@mgood mgood closed this as completed Apr 17, 2015
@ducu
Copy link
Author

ducu commented Apr 18, 2015

Sorry but it doesn't work.. What info would you need to debug this?

screen shot 2015-04-18 at 15 46 39

@iambibhas
Copy link

iambibhas commented Aug 22, 2016

Facing the same issue. SQLAlchemy - 0 queries. DEBUG is True.

Edit: I think setting SQLALCHEMY_RECORD_QUERIES = True made it work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants