Open jpjamipark opened 7 years ago
First off, thanks for writing this python library; it's a life-saver for my project.
I'm trying to connect to the IEX websocket server using this library with the example code (slightly modified):
from socketIO_client import SocketIO, BaseNamespace import logging logging.getLogger('socketIO-client').setLevel(logging.DEBUG) logging.basicConfig() from socketIO_client import SocketIO, LoggingNamespace def on_connect(): socketIO.emit('subscribe','snap') def on_disconnect(): print('disconnect') def on_reconnect(): print('reconnect') socketIO = SocketIO('https://ws-api.iextrading.com/1.0', Namespace=LoggingNamespace, wait_for_connection=True, resource='last') socketIO.on('connect', on_connect) socketIO.on('disconnect', on_disconnect) socketIO.on('reconnect', on_reconnect)
However every time I run this, I run into the following error:
WARNING:socketIO-client:ws-api.iextrading.com:443/1.0/tops [engine.io waiting for connection] unexpected status code (404 <!--#set var="title" value="404" --> <!--#set var="page" value="404" --> <!--#include virtual="/components/page.html" --> )
The URL works fine on the javascript client:
const url = 'https://ws-api.iextrading.com:443/1.0/tops' const socket = require('socket.io-client')(url) socket.on('connect', () => { socket.emit('subscribe', 'snap') })
How can I fix this issue? Does it have something to do with the commented out HTML?
did you ever figure this out?
Similar issues
https://github.com/invisibleroads/socketIO-client/issues/175
I use verify=False
verify=False
Doesn't help much either.
+1
First off, thanks for writing this python library; it's a life-saver for my project.
I'm trying to connect to the IEX websocket server using this library with the example code (slightly modified):
However every time I run this, I run into the following error:
The URL works fine on the javascript client:
How can I fix this issue? Does it have something to do with the commented out HTML?