[Solved] How to print the ACTUAL SQLAlchemy query to troubleshoot: SQLAlchemy filter statement replaces filter critieria with %(column_name_1)s

It is behaving just the way it should. It’s just that how you print the query. from sqlalchemy.dialects import postgresql query = statement.compile(dialect=postgresql.dialect(),compile_kwargs={“literal_binds”: True}) print(query) # will print the compiled query statement againt the dialect. 1 solved How to print the ACTUAL SQLAlchemy query to troubleshoot: SQLAlchemy filter statement replaces filter critieria with %(column_name_1)s

[Solved] builtins.TypeError TypeError

You don’t need to pass category_name, you only need the category id. The category name should be contained in each of the item fetched from the database. You’re getting an error because cat_id is not defined when the function def getCategoryItems(category_name, cat_id) is called. I would suggest, however, if you want to really get all … Read more