解决:sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: ‘select 1‘发表时间:2024-09-17 12:53 这个程序是用来测试的,你肯定是这么写的? with app.app_context(): with db.engine.connect() as conn: rs = conn.execute("select 1") print(rs.fetchone()) 接下来我们需要对上面代码进行修改,如下所示: from sqlalchemy import text with app.app_context():
文章分类:
mysql
|
扫码添加经理微信 |