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

Hi,

I’m using cellprofiler/cellprofiler:4.0.7 docker and I’m running an analysis pipeline with a CreateBatchFile module at the end. When I run cellprofiler I get the following error:

root@644d64ee1e26:/usr/local/src# cellprofiler  -p /code/analysis.cppipe -i /input -o /output
Given the large number of image sets, you may want to consider using ExportToDatabase as opposed to ExportToSpreadsheet.
Failed to prepare run for module CreateBatchFiles
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/cellprofiler_core/pipeline/_pipeline.py", line 1362, in prepare_run
    not module.prepare_run(workspace)
  File "/usr/local/lib/python3.8/dist-packages/cellprofiler/modules/createbatchfiles.py", line 292, in prepare_run
    path = self.save_pipeline(workspace)
  File "/usr/local/lib/python3.8/dist-packages/cellprofiler/modules/createbatchfiles.py", line 353, in save_pipeline
    m = Measurements(copy=workspace.measurements, filename=h5_path)
  File "/usr/local/lib/python3.8/dist-packages/cellprofiler_core/measurement/_measurements.py", line 116, in __init__
    self.hdf5_dict = HDF5Dict(
  File "/usr/local/lib/python3.8/dist-packages/cellprofiler_core/utilities/hdf5_dict.py", line 191, in __init__
    self.hdf5_file = h5py.File(self.filename, mode)
  File "/usr/local/lib/python3.8/dist-packages/h5py/_hl/files.py", line 406, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/usr/local/lib/python3.8/dist-packages/h5py/_hl/files.py", line 179, in make_fid
    fid = h5f.create(name, h5f.ACC_TRUNC, 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 108, in h5py.h5f.create
OSError: Unable to create file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')

Any suggestions are appreciated.
Thank you.

Does your copy of CellProfiler have permissions to write to the folder which CreateBatchFiles has been pointed to? This would be the Default Output Folder if you didn’t specify a directory within the module.

Sorry for the late response. You are right. I was using docker and the owner of the output was root instead of me. Thank you.