Trouble using websockets with Flask
I am trying to host a flask site that uses websockets. After many attempts of installing different packages, I seem to have hit a dead end with this error:
_proto_tcp = socket.getprotobyname('tcp')
OSError: protocol not found
This seems to be the solution when hosting locally:
Yes, you should have a /etc/protocols file. It must have been deleted somehow. It comes from the netbase package.
This should reinstall it:
sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall netbase
But as I am working with railway, i dont have access to that method. Any help?
Solution:Jump to solution
you need to use websockets over http, but externally this would be wss://domain.com/ws
3 Replies