Web.py -AttributeError: 'module' object has no attribute 'get_list_info', 出错原因


code.py


 class Account:
    def GET(self,name):
            account_info = model.get_list_info(name)
            return render.account(name,account_info)

model.py


 def get_list_info(name):
    return db.select('essay',what="essay_name,essay_date,essay_url",where="account_id = $name")

错误提示: account info = model.get list_info(name), referer: http://127.0.0.1/ AttributeError: 'module' object has no attribute 'get _list _info', referer: http://127.0.0.1/

get_ list_info换了好几个名称,排除了命名冲突的原因,,找了半天实在找不出错在哪里,请大家帮忙看下

web.py python 框架

醋11111 10 years, 11 months ago

问题解决了,重启服务器,把代码reload一下就行了。

狂暴黑岩舒 answered 10 years, 11 months ago

Your Answer