PyWebIO
PyWebIO copied to clipboard
can't use debug=True and host='0.0.0.0' if flask app integrated with PyWebIO
BUG Description
1, parameter host='0.0.0.0' can not be used but "localhost" works if original Flask application integrated with PyWebIO. 2, papameter debug=True can not be used too, in my application, below parameter works: app.run(host='localhost', port=5000, ssl_context=("localhost_cert.pem", "localhost_key.pem")) details see the pictures i marked
Environment Information
- OS and Version: Windows10 +latest Pycharm PyCharm 2021.3 (Community Edition)
- Browser and Version: Chrome96
- Python Version: python3.1
- PyWebIO Version: 1.5
Does the Flask server work good when you remove the app.add_url_rule() line ?
Does the Flask server work good when you remove the
app.add_url_rule()line ?
I tried delete the app.add_url_rule() line, and if host='0.0.0.0', then the server can start but can not be visit
It seems that there are some problems with the ssl_context config. Please make sure your Flask app can work well first, and then add PyWebIO app to it via app.add_url_rule()
so i tried to remove the ssl_context parameter, and add debug=True, it become this: app.run(debug=True,host='localhost', port=5000) it still not work,the server can not be started:
- Serving Flask app '' (lazy loading)
- Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
- Debug mode: on
- Restarting with stat
stopped here.