我已经设置了一个烧瓶安全应用,但我在创建用户和重置密码时遇到错误。
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_securit /decorators.py", line 230, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_security/views.py", line 118, in register
user = register_user(**form.to_dict())
File "/usr/local/lib/python2.7/dist-packages/flask_security/registerable.py", line 41, in register_user
'welcome', user=user, confirmation_link=confirmation_link)
File "/usr/local/lib/python2.7/dist-packages/flask_security/utils.py", line 401, in send_mail
mail.send(msg)
File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 492, in send
message.send(connection)
File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 427, in send
connection.send(self)
File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 188, in send
self.host.sendmail(sanitize_address(envelope_from or message.sender),
File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 105, in sanitize_address
nm, addr = addr
ValueError: too many values to unpack ValueError: too many values to unpack
我刚刚按照https://pythonhosted.org/Flask-Security/quickstart.html#basic-sqlalchemy-application
的指南我需要帮助找出问题所在。
这是我的电子邮件配置:
app.config['MAIL_SERVER'] = 'smtp.gmail.com'
app.config['MAIL_PORT'] = 465
app.config['MAIL_USE_SSL'] = True
app.config['MAIL_USERNAME'] = 'devskovsted@gmail.com'
app.config['MAIL_PASSWORD'] = '**********'
app.config['MAIL_DEFAULT_SENDER'] = 'devskovsted@gmail.com'
mail = Mail(app)
/ Kresten