Sqlalchemy: Typeerror: Unhashable Type Creating Instance, Sqlalchemy
I am getting an error while trying to update code for: https://github.com/thrisp/flask-security from python 2.7 to 3.3 given the following most basic instance test.py: from flask
Solution 1:
A similar issue is discussed here: Unhashable Type error when modifying SqlAlchemy Models
A solution (or at least workaround) is to define a hash function in your Role class, something like this:
def__hash__(self):
returnhash(self.name)
Post a Comment for "Sqlalchemy: Typeerror: Unhashable Type Creating Instance, Sqlalchemy"