0

知道如何解决这个问题吗?

Traceback (most recent call last):
  File "manage.py", line 1, in <module>
    from punchstarter import manager
  File "/app/punchstarter/__init__.py", line 29, in <module>
    mail = Mail(app)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_mail.py",     line 539, in __init__
    self.state = self.init_app(app)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_mail.py", line 566, in init_app
    state = self.init_mail(app.config, app.debug, app.testing)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_mail.py", line 552, in init_mail
    int(config.get('MAIL_DEBUG', debug)),
ValueError: invalid literal for int() with base 10: 'False'

从我的__init__.py第 29 行:

mail = Mail(app)

我正在运行 python,我认为配置存在一些问题flask_mail,但我不确定问题出在哪里。

4

1 回答 1

1

app.debug = 0

这对我有用

mail = Mail()  
app.debug = 0  
mail.init_app(app)
于 2016-09-14T13:42:32.760 回答