debug superset already attatched to session

  • 按照这个来解决

https://stackoverflow.com/questions/24291933/sqlalchemy-object-already-attached-to-session

通过session.object_session获得的是User已经被attached的session

  • import路径有问题 https://stackoverflow.com/questions/24697394/flask-sqlalchemy-moving-models-causes-invalidrequesterror-already-attached-to

不是这个的问题
session.add(user)的时候就出错了