Could you post the line of code, which is raising this error:
TypeError: self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling

or alternatively the definition of your Dataset? I assume something is wrong in __getitem__.