[Errno 2] error, no such file or directory when running analysis

Sample image and/or code


Phase/DIC images of cells

Analysis goals

I used ilastik to generate probability maps which I am now trying to segment those probability outputs using CellProfiler. I want to perform a cell count, then measure the size of cells. From there, I want to compare the proportion of small rounded cells vs proportion of larger flattened cells (which I think the ClassifyObjects module is best for, haven’t gotten there yet!)


After testing my pipeline in Test mode, everything seemed to be working fine. However when I click ‘Analyze Images’ I get the following error message (screenshot attached):
Error while processing (remote worker):
(Worker) FileNotFoundError: [Errno 2] No such file or directory: 'g\my drive\1 results\cellprofiler\Cpmeasurementsvwxvzmb.hdf5
Do you want to stop processing?

I tried to set the temp folder to a location I was sure I had admin access (taking advice form this thread) to no avail. I also tried relaunching the program, no change.
If I click “Continue processing” on the error message, the progress bar doesn’t move and time just keeps increasing.

Any help hugely appreciated, TIA!!

Hi @cherry,

Are you trying to access the images that are in the external hard drive?

Since you said, in the test mode your pipeline works fine is it the same image location (i.e.image file path) you are trying to use?

May be screen shot of the terminal/command window, a sample image with your sample pipeline will help us to reproduce the error so we can help you better.



Hi @cherry,

It looks like you’re running this on Windows - if so would you be able to copy in the expanded error message that should appear in the black console window?

It might also help if you could upload the .cpproj file you’re trying to run.


Hi David,

The error message from the black console window is as follows:

  • Progress Counter({‘Unprocessed’: 5})
  • Starting workers on address tcp://
  • Progress Counter({‘Unprocessed’: 4, ‘InProcess’: 1})
  • Worker 1: Starting job
  • Worker 1: Error in worker
  • Worker 1: Traceback (most recent call last):
  • Worker 1: File “cellprofiler_core\worker_worker.py”, line 197, in do_job
  • Worker 1: File “cellprofiler_core\utilities\measurement.py”, line 91, in load_measurements_from_buffer
  • Worker 1: File “tempfile.py”, line 331, in mkstemp
  • Worker 1: File “tempfile.py”, line 250, in _mkstemp_inner
  • Worker 1: FileNotFoundError: [Errno 2] No such file or directory: ‘g:\my drive\1 results\cellprofiler\Cpmeasurementshlutozgc.hdf5’
  • Worker 0: Starting CellProfiler 4.0.7
  • Worker 1: Starting CellProfiler 4.0.7
  • Worker 0: Cancelling worker
  • Worker 1: Cancelling worker
  • Worker 3: Starting CellProfiler 4.0.7
  • Worker 3: Cancelling worker
  • Worker 2: Starting CellProfiler 4.0.7
  • Worker 2: Cancelling worker
  • Cancelled!

I have attached the .cpproj file and a sample image.

Many thanks!

Counting cells TEST v2.0.cpproj (434.3 KB)
T2006_LMN+DCN+IL8_day2_5Mar20_10x_bot_ADJ.tif (14.1 MB)

Hi Lakshmi,

The images αre located in a local university network drive – could this be an issue?
I have replied to David below with the error messages etc.

Thanks for your reply,

Hi @cherry,

Sometimes reading the input images from the external drive might be a problem.
I tried (in version CP 4.0.7) your pipeline with the sample image that you shared. I clicked on the Analyze images, it works perfectly fine. Got all the output files. I tried both in the default output folder option & elsewhere (chose a path in my local machine).
Did you try having images in your local machine?



Thanks for that @cherry, it definitely looks like the software is unable to write temporary files to drive G. Would you be able to send a screenshot of your system environment variables?

Thanks everyone! A simple move of files to a local location helped (can’t write into Google Drive).