Hello,
I am new to python and working on the creating client of websocket API. In One function I am getting the error
*********************
How can I fix this?
Thanks and regards
Dhananjay Kale
I am new to python and working on the creating client of websocket API. In One function I am getting the error
[b]if 3000 <= code < 4000:
Output:TypeError: '<=' not supported between instances of 'int' and 'NoneType'[/b]
the complete error is *********************
Error:Traceback (most recent call last):
File "c:\Users\Development\Documents\Python\WebSocket\WebsocketSample_Phython.py", line 577, in <module>
asyncio.get_event_loop().run_until_complete(functionCall())
File "C:\Users\Development\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 468, in run_until_complete
return future.result()
File "c:\Users\Development\Documents\Python\WebSocket\WebsocketSample_Phython.py", line 569, in functionCall
await GetInstruments()
File "c:\Users\Development\Documents\Python\WebSocket\WebsocketSample_Phython.py", line 453, in GetInstruments
response = await websocket.recv()
File "C:\Users\Development\AppData\Local\Programs\Python\Python36-32\lib\site-packages\websockets\protocol.py", line 323, in recv
raise ConnectionClosed(self.close_code, self.close_reason)
File "C:\Users\Development\AppData\Local\Programs\Python\Python36-32\lib\site-packages\websockets\exceptions.py", line 147, in __init__
if 3000 <= code < 4000:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
*********************How can I fix this?
Thanks and regards
Dhananjay Kale