from socketIO_client_nexus import SocketIO, LoggingNamespace
from requests.exceptions import ConnectionError
try:
socket = SocketIO('https://myURL/myendpoint', verify=False, wait_for_connection=False)
socket.wait()
except ConnectionError:
print('The server is down. Try again later.')
When I run the above code, I get the below stack trace.
This is a quite known issue. People who faced this issue said that it happened because the socket server that they were trying to connect to was built on socketio 2.x. However, socketIO-client-nexus 0.7.6 seems to have reportedly solved their problems. However, I'm still facing the same issue. Don't know what's wrong. The server that I'm trying to connect to is built on socketio 2.0.1