Skip to content Skip to sidebar Skip to footer

Typeerror: An Integer Is Required, Sqlalchemy + Flask

I've got the following code which runs on my machine without errors: def update_user(): user = User.query.get(session.get('user') or -1) if user is None: return

Solution 1:

It could be that one of your columns in that user's row is a different type than SQLAlchemy expects.

Here is an example of someone getting that error because one of their Boolean columns was empty instead of true or false: https://groups.google.com/forum/#!topic/sqlalchemy/SrKN8yfYEUw

Post a Comment for "Typeerror: An Integer Is Required, Sqlalchemy + Flask"