[Flask] env variable not set

west alto westalto at gmail.com
Tue Aug 11 19:14:11 CEST 2015


Hi Gurus,

Noob here. It makes me nuts figuring this out. Kindly help.


   1. import os
   2.
   3. from flask.ext.script import Manager
   4. from api import api
   5.
   6.
   7. manager = Manager(api)
   8.
   9.
   10. def runserver():
   11.     api.run()
   12.
   13.
   14. if __name__ == '__main__':
   15.     root_dir = os.path.abspath(os.path.dirname(__file__))
   16.     os.environ["APP_CONFIG_FILE"] = os.path.join(root_dir,
   'env/dev.py')
   17.     manager.run()


running python manage.py runserver gives me this error

RuntimeError: The environment variable 'APP_CONFIG_FILE' is not set and as
such configuration could not be loaded.  Set this variable and make it
point to a configuration file


Thanks,

West
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20150812/6922e744/attachment.html>


More information about the Flask mailing list