Julian Julian - 1 month ago 23
Python Question

Running Flask-SocketIO app on PythonAnywhere raises IOError

I'm trying to run a chat app using Flask-SocketIO on PythonAnywhere. Loading the page takes a long time or only partially loads and the chat doesn't work. It works when I run it locally. Why doesn't it work on PythonAnywhere?

2016-10-27 13:23:27,059 :IOError: write error
2016-10-27 13:23:27,060 :Error running WSGI application
Traceback (most recent call last):
File "/bin/user_wsgi_wrapper.py", line 156, in __call__
yield response
GeneratorExit

Answer

PythonAnywhere doesn't support websockets. Flask-SocketIO requires WebSocket support from the server, so it won't work if that's not available.

Comments