I was doing my User model by inheriting UserMixin from flask-login, an exception was raised: This is because I implemented my own "userid" by replacing the default "id" attribute in UserMixin, so for id columns just use the default "id" and not implement any attribute according to your wish if you want to use UserMixin … Continue reading [python]Flask-login Usermixin raised exception: ‘No `id` attribute – override `get_id`’