Cryosparc cli issue

Hello,

I recently needed to get more disk space as I had run out. From what I’ve managed to gather from other posts, the way to set the new directory is to use cryosparc cli and set the new project directory. When I do so, I get the following:

$ cryosparcm icli
Python 3.12.11 | packaged by conda-forge | (main, Jun 4 2025, 14:45:31) [GCC 13.3.0]
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 8.37.0 – An enhanced Interactive Python. Type ‘?’ for help.
Connected to tom-TRX50-AI-TOP:31002
api, db, gfs ready to use

In [1]: cli.update_project( project_uid = ‘P2’, attrs = { ‘project_dir’ : ‘/mnt/pool/cryosparc-out/CS-tdt-take2/P2’})

NameError Traceback (most recent call last)
Cell In[1], line 1
----> 1 cli.update_project( project_uid = ‘P2’, attrs = { ‘project_dir’ : ‘/mnt/pool/cryosparc-out/CS-tdt-take2/P2’})

NameError: name ‘cli’ is not defined

One suggestion I found was to make sure cryosparc was in my path: echo $PATH

$ echo $PATH
/home/tom/bin/cryosparc_master/bin:

So it is there. The next suggestion was to refresh: $ cryosparcm cli “refresh_job_types()”
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/home/tom/bin/cryosparc_master/cli/setup_client.py”, line 28, in
result = eval(sys.argv[1], {“api”: api, “db”: db, “gfs”: gfs}, {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1, in
NameError: name ‘refresh_job_types’ is not defined $ cryosparcm cli “reload()”
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/home/tom/bin/cryosparc_master/cli/setup_client.py”, line 28, in
result = eval(sys.argv[1], {“api”: api, “db”: db, “gfs”: gfs}, {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1, in
NameError: name ‘reload’ is not defined

From what I can tell, this seems to be a bug in the setup. Everything else seems to be working- I just ran out of disk space with that directory. Is there another way to reset the directory path?

Thanks, Tom

And I also tried a ‘reload’ which gives a similar error:

@tom Are you using CryoSPARC v5? If so, the CLI has changed after v4.

Have you since created or are planning a copy of the project directory on larger storage? In this case:

  1. One should apply the Archive Project action to the project before preparing the copy, to ensure that the database and project directory are in sync before and after the storage migration.
  2. After the copy is complete, one should unarchive the project and specify the new project directory path when prompted.

I didn’t think of the archive function, so no, I didn’t do that- just copied everything from the old disk-directory to the new one.

I am running version 5.0 and didn’t realise that the CLI has changed…

Have I messed things up to try the archive function? I can do it retrospectively if that will work.

Thanks! Tom

Assuming the project is still associated with the old project directory, you can try the following:

  1. Apply the Archive Project action to the project.
  2. Then ensure that the new copy (on larger storage) is identical to the contents of the old project directory.
  3. Then unarchive the project.

Thanks very much- I think I finally have things working again.

Actually, I spoke too soon. It looked like the archive and unarchive worked fine and I started a job, but I get the following errors:

Error occurred while processing micrograph J4/motioncorrected/004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_patch_aligned_doseweighted.mrc Traceback (most recent call last): File “/home/tom/bin/cryosparc_worker/compute/pipeline.py”, line 69, in exec return self.process(item) ^^^^^^^^^^^^^^^^^^ File “compute/jobs/extract/run.py”, line 542, in compute.jobs.extract.run.run_extract_micrographs_multi.extraction_worker.process File “compute/jobs/extract/run.py”, line 544, in compute.jobs.extract.run.run_extract_micrographs_multi.extraction_worker.process File “/home/tom/bin/cryosparc_worker/compute/blobio/mrc.py”, line 240, in read_mrc with open(fname, “rb”) as file_obj: ^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: ‘/mnt/pool/cryosparc-out/CS-tdt-take2/J4/motioncorrected/004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_background.mrc’ Marking J4/motioncorrected/004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_patch_aligned_doseweighted.mrc as incomplete and continuing…

I find this strange and I can see the files in the directory but for some reason my job is not seeing them.

Please can you post the out put of this command

namei -l /mnt/pool/cryosparc-out/CS-tdt-take2/J4/motioncorrected/004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_background.mrc

Thanks- I think that tells me what is wrong. There are so many files I didn’t try to check each one, but it seems that when I copied things over, not quite all of them moved. The output is:

namei -l /mnt/pool/cryosparc-out/CS-tdt-take2/J4/motioncorrected/004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_background.mrc
f: /mnt/pool/cryosparc-out/CS-tdt-take2/J4/motioncorrected/004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_background.mrc
drwxr-xr-x root root /
drwxr-xr-x root root mnt
drwx------ tom tom pool
drwxrwxr-x tom tom cryosparc-out
drwxrwxr-x tom tom CS-tdt-take2
drwxrwxr-x tom tom J4
drwxrwxr-x tom tom motioncorrected
004047701548986065793_FoilHole_18286722_Data_18281240_4_20250718_213711_fractions_background.mrc - No such file or directory

So I will try to get all of them over now- thanks for the help!

1 Like