John1231983:

def del (self): self.h5_file.close()


Hi John,
first the syntax is def __del__(self): self.h5_file.close(). Second, are you sure you defined the self.h5_file in the def __init__(...)?
It works in my tests. In fact, it should work without subclassing data.Dataset. Your problem sounds like you didn’t incluce the self. prefix when you defined the h5_file in your init function?
Regards,
Foivos