Unable to open database file SQLite



Hi, everyone. This is my first post here. I’ve created a pipeline for my project but everytime I try to export the data and creat a CPA file the following error shows up:

Traceback (most recent call last):
_ File “cellprofiler\pipeline.pyc”, line 1199, in prepare_run_
_ File “cellprofiler\modules\exporttodatabase.pyc”, line 515, in prepare_run_
_ File “cellprofiler\modules\exporttodatabase.pyc”, line 184, in connect_sqlite_
OperationalError: unable to open database file

I would like to know how can I fix this. Can you guys help me? Thank you in advance.


Hello again. Can anyone help me?



Can you post the pipeline and images, as well as more info about what OS, what version of CP, etc? It’s hard to know what’s going wrong just from the error message- the only thing I can think it might be is that you’re trying to put the database somewhere you don’t have write permission for.


Yes, of course! I’m sorry, this is my first time posting here in the forum and I’m desperate. I’m sharing an image of the pipeline. The version is CP 2.0.10997.

Thank you so much for your time.


Briefly, the pipeline is:
ImageMath: invert
ApplyThreshold: binary, adaptive MOG
IdentifyPrimaryObjects: adaptive RC min 20 max 50
FilterObjects: min 0.5 max 1
ExportToDatabase: SQLite, create a CPA file



I meant the pipeline file itself. It’s not possible to troubleshoot this without one.

I should say though that it if this is a bug, we really don’t support CP 2.0 anymore. My best advice would be to try CP2.2 at least.



I’m sorry again! I’m just getting started and a total begginer. I’ve already tried all the other versions of the software. I’m using CP 2.0 because it’s the one that’s installed in the PCs at the university and it seems to work. Nevertheless, here’s the pipeline file itself.

Thank you so much for your time.

BCP.cp (7.8 KB)


I don’t currently have access to a computer that will run CP2, it turns out- my current machine is too up-to-date.

The only things I can suggest to try at the moment therefore are

  1. Try turning CPA properties file creation off and see if that helps
  2. Make certain your Default Output folder is set somewhere you are certain you have write access to, like your Desktop
  3. If none of that works, see if you can get ExportToSpreadsheet to work- at least you’ll have access to your data