First of all, this is not an exception of the Flask library. This error often appears in Python2.
The problem is: the problem with the SocketServer module in Python2.
Solution:
- Do not use the built-in Server, start the service through gunicoon or uwsgi
run
Add in the method,threaded
parameters:
app.run(threaded=True)
- Upgrade to Python3