0

我是 web2py 的新手,当我开始使用内置身份验证时,在填写用户名、电子邮件等后,它会生成以下票证。我不知道该怎么办!任何帮助都会受到欢迎!我正在运行 mac osx 10.8。Postgres 9.3。

门票

Traceback (most recent call last):
  File "/Users/JoaoBtte/Documents/python/Hello/gluon/restricted.py", line 217, in      restricted
     exec ccode in environment
  File "/Users/JoaoBtte/Documents/python/Hello/applications/Cifra/controllers/default.py",  line 90, in <module>
  File "/Users/JoaoBtte/Documents/python/Hello/gluon/globals.py", line 378, in <lambda>
    self._caller = lambda f: f()
  File "/Users/JoaoBtte/Documents/python/Hello/applications/Cifra/controllers/default.py", line 88, in user
    return dict(form=auth())
  File "/Users/JoaoBtte/Documents/python/Hello/gluon/tools.py", line 1297, in __call__
    return getattr(self, args[0])()
  File "/Users/JoaoBtte/Documents/python/Hello/gluon/tools.py", line 2554, in register
    self.login_user(user)
  File "/Users/JoaoBtte/Documents/python/Hello/gluon/tools.py", line 1976, in login_user
    user = Row(user)
  File "/Users/JoaoBtte/Documents/python/Hello/gluon/dal.py", line 6986, in <lambda>
     __init__ = lambda self,*args,**kwargs: self.__dict__.update(*args,**kwargs)
  TypeError: 'NoneType' object is not iterable
4

1 回答 1

1

Do you have the following line in one of your model files (usually in db.py) ?

from gluon.tools import Auth
auth = Auth(db)

Could you show us your default.py controller?

于 2013-10-01T07:14:17.603 回答