草庐IT

UnboundExecutionError

全部标签

python - SQLAlchemy.exc.UnboundExecutionError : Could not locate a bind configured on mapper Mapper|SellsTable|sellers or this Session 错误

我创建了一个使用SQLAlchemy的类:classDbAbsLayer(object):def__init__(self):self.setConnectionURI();defsetConnectionURI(self):self.dbDriver="mysql";self.dbHostname="localhost";self.dbUsername="root";self.dbPassword="123";self.dbName="mydbname";defcreateSession(self):Session=sessionmaker();self.session=Sessio