You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting below issue very frequently after some time of running program.
ERROR:websocket:error from callback <bound method AlphaTrade.__on_close_callback of <alphatrade.alphatrade.AlphaTrade object at
0x0000025FC445FF70>>: __on_close_callback() takes from 1 to 2 positional arguments but 4 were given
Generally happens on calling following function:
sas.subscribe(optionType, LiveFeedType.COMPACT)
Trace logs are as follows:
ERROR:websocket:error from callback <bound method AlphaTrade.__on_close_callback of <alphatrade.alphatrade.AlphaTrade object at
0x0000025FC445FF70>>: __on_close_callback() takes from 1 to 2 positional arguments but 4 were given
Traceback (most recent call last):
File "d:\alokguptaxggn\python_sandbox\python_stories\python_stories\01-Development\algoTrade\63AlgoTrade-MIS-4-RSI-56.py", line 238, in
putBuyPrice = getOptionPrice(sas, NIFTY_PUT)
File "d:\alokguptaxggn\python_sandbox\python_stories\python_stories\01-Development\algoTrade\63AlgoTrade-MIS-4-RSI-56.py", line 20, in getOptionPrice
sas.subscribe(optionType, LiveFeedType.COMPACT)
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\alphatrade\alphatrade.py", line 857, in subscribe
return self.__ws_send(data)
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\alphatrade\alphatrade.py", line 460, in __ws_send
self.__websocket.send(*args, **kwargs)
ocal\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Pythonpy", line 203, in send
if not self.sock or self.sock.send(data, opcode) == 0:
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_core.py", line 283, in send
return self.send_frame(frame File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_core.py", line 311, in send_frame
l = self._send(data)
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_core.py", line 525, in _send
return send(self.sock, data) File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_socket.py", line 146, in send
raise WebSocketConnectionClosedException("socket is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: socket is already closed.
The text was updated successfully, but these errors were encountered:
Getting below issue very frequently after some time of running program.
ERROR:websocket:error from callback <bound method AlphaTrade.__on_close_callback of <alphatrade.alphatrade.AlphaTrade object at
0x0000025FC445FF70>>: __on_close_callback() takes from 1 to 2 positional arguments but 4 were given
Generally happens on calling following function:
sas.subscribe(optionType, LiveFeedType.COMPACT)
Trace logs are as follows:
ERROR:websocket:error from callback <bound method AlphaTrade.__on_close_callback of <alphatrade.alphatrade.AlphaTrade object at
0x0000025FC445FF70>>: __on_close_callback() takes from 1 to 2 positional arguments but 4 were given
Traceback (most recent call last):
File "d:\alokguptaxggn\python_sandbox\python_stories\python_stories\01-Development\algoTrade\63AlgoTrade-MIS-4-RSI-56.py", line 238, in
putBuyPrice = getOptionPrice(sas, NIFTY_PUT)
File "d:\alokguptaxggn\python_sandbox\python_stories\python_stories\01-Development\algoTrade\63AlgoTrade-MIS-4-RSI-56.py", line 20, in getOptionPrice
sas.subscribe(optionType, LiveFeedType.COMPACT)
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\alphatrade\alphatrade.py", line 857, in subscribe
return self.__ws_send(data)
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\alphatrade\alphatrade.py", line 460, in __ws_send
self.__websocket.send(*args, **kwargs)
ocal\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Pythonpy", line 203, in send
if not self.sock or self.sock.send(data, opcode) == 0:
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_core.py", line 283, in send
return self.send_frame(frame File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_core.py", line 311, in send_frame
l = self._send(data)
File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_core.py", line 525, in _send
return send(self.sock, data) File "C:\Users\alokg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\websocket_socket.py", line 146, in send
raise WebSocketConnectionClosedException("socket is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: socket is already closed.
The text was updated successfully, but these errors were encountered: