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.