import pickle
import katdal
url = "https://archive-gw-1-kat.ac.za/12345/12345_sdk_l0.full.rdb?token=eyABCD"
ds = katdal.open(url)
pickle.dumps(ds)
results in
TypeError: cannot pickle '_thread.lock' object
The proximal cause is the default pickle functionality attempting to pickle threading Locks (of which there aren't many)
but serialisability of datasets was probably never part of the design. A solution might involve implementing __reduce__ where appropriate.
This impacts the katdal backend in dask-ms (its not possible to pickle xarray Datasets derived from katdal)
results in
TypeError: cannot pickle '_thread.lock' objectThe proximal cause is the default pickle functionality attempting to pickle threading Locks (of which there aren't many)
but serialisability of datasets was probably never part of the design. A solution might involve implementing
__reduce__where appropriate.This impacts the katdal backend in dask-ms (its not possible to pickle xarray Datasets derived from katdal)