smartWebSocketV2:304] Error occurred during WebSocket connection: WebSocketApp.run_forever()
-
[E 240226 09:00:36 smartWebSocketV2:304] Error occurred during WebSocket connection: WebSocketApp.run_forever() got an unexpected keyword argument 'ping_payload'
Exception in thread Thread-8 (feed):
Traceback (most recent call last):
File "C:\Users\ashig\anaconda3\envs\trader-env\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\ashig\anaconda3\envs\trader-env\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\ashig\AppData\Local\Temp\ipykernel_11200\1613896697.py", line 325, in feed
File "C:\Users\ashig\anaconda3\envs\trader-env\lib\site-packages\SmartApi\smartWebSocketV2.py", line 305, in connect
raise e
File "C:\Users\ashig\anaconda3\envs\trader-env\lib\site-packages\SmartApi\smartWebSocketV2.py", line 301, in connect
self.wsapp.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}, ping_interval=self.HEART_BEAT_INTERVAL,
TypeError: WebSocketApp.run_forever() got an unexpected keyword argument 'ping_payload' -
-
@abhisingh1891 change websocket url it works
-
@Moderator_1 Resolved the issue by using version numbers of dependencies mentioned in git repo. It seems there is some conflict with updated versions of any of the dependency packages.
Following requirements listed in requirements_dev.txt helped:
attrs==23.1.0
autobahn==23.6.2
Automat==22.10.0
certifi==2023.5.7
cffi==1.15.1
charset-normalizer==3.1.0
constantly==15.1.0
cryptography==41.0.5
hyperlink==21.0.0
idna==3.4
incremental==22.10.0
isodate==0.6.1
logzero==1.7.0
pycparser==2.21
pyotp==2.8.0
pyparsing==3.1.0
python-dateutil==2.8.2
pytz==2023.3
rdflib==6.3.2
rdflib-jsonld==0.6.2
requests==2.31.0
simplejson==3.19.1
six==1.16.0
Twisted==22.10.0
txaio==23.1.1
typing_extensions==4.6.3
urllib3==2.0.3
websocket-client==1.6.0
zope.interface==6.0 -
@Moderator_1 I am using latest version 1.2.5 of SmartApi-python package. Is there anything else I need to do. Strangley, same code is working fine in google colab environment.
Could it be something to do with bug/issue with version of other package(s)?
-
@Moderator_1 Thank you
-
@ashigro @vijayyande @abhisingh1891 @Moderator_1 @admin noted the message, pls GitHub url, I can refer the code
-
Hello @ashigro, @abhisingh1891 , @vijayyande ,
We have stopped non secure websocket for SmartAPI. It was scheduled for 30th November 2023.
Websocket URL ChangePlease make the requisite changes as directed in the linked post and it should be working.
Apologies for the inconvenience.Regards
SmartAPi Team -
Getting the Same issue
-
me too getting similar error
-
@admin Please help