python web程序,报错:TypeError: object() takes no parameters
diff_sum_count = db.Column(db.Integer(8), nullable=False, default=0, doc=u'执行diff请求总数')
TypeError: object() takes no parameters
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
enter create_init_req_pipe()
start call init_fake_req
init_fake_req() call python vm to run the fake request
--- no python application found, check your startup logs for errors ---
具体的报错代码:
diff_sum_count = db.Column(db.Integer(8), nullable=False, default=0, doc=u'执行diff请求总数')
查了各种资料,发现都跟我的不一样。玩了一下午,回来再看。忽然间想明白了。看这提示,应该是不需要参数,但是传递了参数的意思。那应该就是说Integer这种数据库的数据类型不需要传递参数了。
diff_sum_count = db.Column(db.Integer, nullable=False, default=0, doc=u'执行diff请求总数')
修改一下,再验证下。
成功解决。
网友评论