Cellprofiler3: Pipline with LoadData and --data-file gives error

Hi guys

Maybe my question is quite trivial, but I could not find an answer online (wrong keywords?). I do quite often image analysis with Cellprofiler 3. Since it is a very repetitive task (have a new experiment every two days or so), I was wondering if I can write script to do this and use the LoadData module and the --data-file option.

So I have my normally have my .cpproj file with the loaded images and then I create a Batch_data.h5 file, which I then run. This works perfectly fine.

Now, from this very .cpproj file I exported a .cppipe and a .csv file with the metadata. In the .cppipe i removed the Images, Metadata, NamesAndTypes and Groups modules and add the LoadData module right at the start.
In LoadData I leave everything untouched (Input datafile location = Elsewhere, Nameof the file = None), but change the Base Image location to “None”.

I can then generate a Batch_data.h5 file by using

runcp3.sh -r -c -p file.cppipe -o cp.out --data-file images.csv -L 30

This works fine. But, when I run the Batch_data.h5 I get this error:

user@izblisbon:~/myimaging/Test/cp.out$ cellprofiler -p Batch_data_auto.h5 -c -r -f 1 -l 5

Failed to prepare run for module LoadData
Traceback (most recent call last):
  File "/sw_install/CellProfiler/cellprofiler/pipeline.py", line 2085, in prepare_run
    if ((not module.prepare_run(workspace)) or
  File "/sw_install/CellProfiler/cellprofiler/modules/loaddata.py", line 821, in prepare_run
    fd = self.open_csv()
  File "/sw_install/CellProfiler/cellprofiler/modules/loaddata.py", line 722, in open_csv
    return open(self.csv_path, 'rb')
IOError: [Errno 21] Is a directory: u'/mnt/imaging.data/Test/cp.out/'

Does anyone see the error? Do I have to adapt more in the LoadData module? Does anyone have a MWE?

Thanks a lot :slight_smile: