I want to store an object of my python class in a file so that it can be reused. This class has members of 'PyIDispatch' object. I tried to serialize using JSON, Pickle and, dill, none of them worked.
obj_name = ica_api_wrapper.IcaApi(config, close_on_exit=False)
with open('data_file.pkl', 'wb') as file:
dill.dump(inca_api_o, file)
This throws the error: TypeError: cannot pickle 'PyIDispatch' object