7 frames TypeError: Object of type int64 is not JSON serializable
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py in sendClose(self, code, reason) 1989 if reason is not None: 1990 if code is None: -> 1991 raise Exception("close reason without close code") 1992 1993 if type(reason) != six.text_type:
I am not using pandas datatype. I am using list. But values in list are taken from pandas dataframe. In attachment code, subscription list is hardcoded (given directly) but in real it is generated by following code: please use this code for generating subscription list and then try.
subscription_list = [strike_instrument_token_CE,strike_instrument_token_PE] I am not using pandas datatype
You are using NumPy datatype (numpy.int64) item inside subscription list. It should be int data type instead. You need to typecast these numpy dtype to int. Something like: subscription_list = [int(strike_instrument_token_CE), int(strike_instrument_token_PE)]
In attachment code, subscription list is hardcoded (given directly) but in real it is generated by following code:
please use this code for generating subscription list and then try.
subscription_list = [int(strike_instrument_token_CE), int(strike_instrument_token_PE)]