error: [Errno 98] Address already in use

前端 未结 1 1516
鱼传尺愫
鱼传尺愫 2020-12-20 12:43

I\'m creating a simple flaskapp which I\'m going to deploy on heroku, first time deploying a python app on heroku, with that said i\'m new to gunicorn.

Addtitional

相关标签:
1条回答
  • 2020-12-20 13:31

    Looks like you're calling run:flaskapp instead of app:flaskapp and run.py is trying to open another instance.

    16:35:44 web.1  |   File "/home/adminuser/Desktop/Github/SoftwareEng/barcodeServer/SoftwareEng/run.py", line 3, in <module>
    

    First, always encapsulate the run:

    if __name__ == '__main__':
        flaskapp.run(debug=True)
    

    And update your procfile to call the app.__init__.py instead:

    web: gunicorn app:flaskapp --log-file=-
    

    PS: I don't know what procfile or foreman are -- heroku things?

    0 讨论(0)
提交回复
热议问题