I cannot open my h5 file

Now I get this error message, when trying to open it with h5py.File(fpath,“r+”):

OSError: Unable to open file (file is already open for read-only)

And in my other project:

OSError: Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')

EDIT: So it appears that I have opened the file under different variable names. I have one function which just does one thing, and only once, so I use the with statement for that. I guess my issue is solved!