0

Any idea how to fix this issue?

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'

from my __init__.py line 29:

mail = Mail(app)

I am running python and I think there is some trouble with the flask_mail configs, but I'm not sure where the problem lies.

poke
  • 369,085
  • 72
  • 557
  • 602

1 Answers1

1

Set

app.debug = 0

This worked for me

mail = Mail()  
app.debug = 0  
mail.init_app(app)
Pani
  • 1,317
  • 1
  • 14
  • 20
  • Helped me. I have set the debug level as "DEBUG". Which is a string. Still wonder why it works in that way. Need to try keeping DEBUG and MAIL_DEBUG in the configs. May be it'll work. – Hareendra Chamara Philips Jan 03 '19 at 08:06