Foivos_Diakogiannis:

syntax is def __del__(self): self.h5_file.close() . Second, are you sure you defi


No, I included it. This is full error. Do you use number of num_workers 1 or 0. I used 4
  File "/home/join/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py", line 167, in make_fid
    fid = h5f.create(name, h5f.ACC_EXCL, fapl=fapl, fcpl=fcpl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 98, in h5py.h5f.create
OSError: Unable to create file (unable to open file: name = '.a.h5', errno = 17, error message = 'File exists', flags = 15, o_flags = c2)
Exception ignored in: <bound method H5Dataset.__del__ of <dataloader.H5Dataset object at 0x7f01bc4d4940>>
Traceback (most recent call last):
  File "loader.py", line 70, in __del__
    self.h5_file.close()
AttributeError: 'H5Dataset' object has no attribute 'h5_file'