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

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")

错误提示: accountinfo = model.getlist_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换了好几个名称,排除了命名冲突的原因,,找了半天实在找不出错在哪里,请大家帮忙看下


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


请问重启服务器是指重启个人电脑吗,请问把代码reload一下 是指reload(sys)吗 我刚学不久 ,也遇到了类似问题。求帮助

【热门文章】
【热门文章】