We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi all
I am writing code to try to use socketIO but it returns with "IterationStop". My code is as follows:
import pandas as pd import json import requests from socketIO_client import SocketIO
TRADING_API_URL = 'https://api.abc.com:443' WEBSOCKET_PORT = 443 ACCESS_TOKEN = '123456789'
def on_connect(): print('Websocket Connected: ' + socketIO._engineIO_session.id) def on_close(): print('Websocket Closed.') socketIO = SocketIO(TRADING_API_URL, WEBSOCKET_PORT, params={'access_token': ACCESS_TOKEN})
Here is the error. Grateful if anyone can help. I am new to programming. Thanks.
StopIteration Traceback (most recent call last) in 5 print('Websocket Closed.') 6 ----> 7 socketIO = SocketIO(TRADING_API_URL, WEBSOCKET_PORT, params={'access_token': ACCESS_TOKEN}) 8 9 socketIO.on('connect', on_connect)
~\anaconda3\lib\site-packages\socketIO_client_init_.py in init(self, host, port, Namespace, wait_for_connection, transports, resource, hurry_interval_in_seconds, **kw) 349 self._callback_by_ack_id = {} 350 self._ack_id = 0 --> 351 super(SocketIO, self).init( 352 host, port, Namespace, wait_for_connection, transports, 353 resource, hurry_interval_in_seconds, **kw)
~\anaconda3\lib\site-packages\socketIO_client_init_.py in init(self, host, port, Namespace, wait_for_connection, transports, resource, hurry_interval_in_seconds, **kw) 52 if Namespace: 53 self.define(Namespace) ---> 54 self._transport 55 56 # Connect
~\anaconda3\lib\site-packages\socketIO_client_init_.py in _transport(self) 60 if self._opened: 61 return self._transport_instance ---> 62 self._engineIO_session = self._get_engineIO_session() 63 self._negotiate_transport() 64 self._connect_namespaces()
~\anaconda3\lib\site-packages\socketIO_client_init_.py in _get_engineIO_session(self) 73 self._http_session, self._is_secure, self._url) 74 try: ---> 75 engineIO_packet_type, engineIO_packet_data = next( 76 transport.recv_packet()) 77 break
StopIteration:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi all
I am writing code to try to use socketIO but it returns with "IterationStop". My code is as follows:
import pandas as pd
import json
import requests
from socketIO_client import SocketIO
TRADING_API_URL = 'https://api.abc.com:443'
WEBSOCKET_PORT = 443
ACCESS_TOKEN = '123456789'
def on_connect():
print('Websocket Connected: ' + socketIO._engineIO_session.id)
def on_close():
print('Websocket Closed.')
socketIO = SocketIO(TRADING_API_URL, WEBSOCKET_PORT, params={'access_token': ACCESS_TOKEN})
Here is the error. Grateful if anyone can help. I am new to programming. Thanks.
StopIteration Traceback (most recent call last)
in
5 print('Websocket Closed.')
6
----> 7 socketIO = SocketIO(TRADING_API_URL, WEBSOCKET_PORT, params={'access_token': ACCESS_TOKEN})
8
9 socketIO.on('connect', on_connect)
~\anaconda3\lib\site-packages\socketIO_client_init_.py in init(self, host, port, Namespace, wait_for_connection, transports, resource, hurry_interval_in_seconds, **kw)
349 self._callback_by_ack_id = {}
350 self._ack_id = 0
--> 351 super(SocketIO, self).init(
352 host, port, Namespace, wait_for_connection, transports,
353 resource, hurry_interval_in_seconds, **kw)
~\anaconda3\lib\site-packages\socketIO_client_init_.py in init(self, host, port, Namespace, wait_for_connection, transports, resource, hurry_interval_in_seconds, **kw)
52 if Namespace:
53 self.define(Namespace)
---> 54 self._transport
55
56 # Connect
~\anaconda3\lib\site-packages\socketIO_client_init_.py in _transport(self)
60 if self._opened:
61 return self._transport_instance
---> 62 self._engineIO_session = self._get_engineIO_session()
63 self._negotiate_transport()
64 self._connect_namespaces()
~\anaconda3\lib\site-packages\socketIO_client_init_.py in _get_engineIO_session(self)
73 self._http_session, self._is_secure, self._url)
74 try:
---> 75 engineIO_packet_type, engineIO_packet_data = next(
76 transport.recv_packet())
77 break
StopIteration:
The text was updated successfully, but these errors were encountered: