Get_project_symlink command Malfunction

Greetings,

I’m currently trying to repair some symlinks, according to the instruction described here. While other commands appear to be working (e.g. cli.get_project_dir_abs), the cli.get_project_symlinks command persistently returns an error (see below). For background, I am running cryoSPARC v4.7.1 on an HPC cluster.

I’d be grateful for any advice or insights. Thank you for taking the time to consider this post.

In [4]: >>> cli.get_project_symlinks('P45')
<ipython-input-4-a1cf2006d2ca>:1: UserWarning: *** CommandClient: command (http://lg03a12.chimera.hpc.mssm.edu:43002/api) did not reply within timeout of 300 seconds, attempt 1 of 3
  cli.get_project_symlinks('P45')
<ipython-input-4-a1cf2006d2ca>:1: UserWarning: *** CommandClient: command (http://lg03a12.chimera.hpc.mssm.edu:43002/api) did not reply within timeout of 300 seconds, attempt 2 of 3
  cli.get_project_symlinks('P45')
---------------------------------------------------------------------------
CommandError                              Traceback (most recent call last)
File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/cryosparc_tools/cryosparc/command.py:105, in CommandClient._get_callable.<locals>.func(*args, **kwargs)
    104 try:
--> 105     with make_json_request(self, "/api", data=data, _stacklevel=4) as request:
    106         res = json.loads(request.read())

File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/contextlib.py:135, in _GeneratorContextManager.__enter__(self)
    134 try:
--> 135     return next(self.gen)
    136 except StopIteration:

File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/cryosparc_tools/cryosparc/command.py:226, in make_request(client, method, url, query, data, headers, _stacklevel)
    224         attempt += 1
--> 226 raise CommandError(error_reason, url=url, code=code, data=resdata)

CommandError: *** (http://lg03a12.chimera.hpc.mssm.edu:43002/api, code 500) Timeout Error

The above exception was the direct cause of the following exception:

CommandError                              Traceback (most recent call last)
Cell In[4], line 1
----> 1 cli.get_project_symlinks('P45')

File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/cryosparc_tools/cryosparc/command.py:108, in CommandClient._get_callable.<locals>.func(*args, **kwargs)
    106         res = json.loads(request.read())
    107 except CommandError as err:
--> 108     raise CommandError(
    109         f'Encounted error from JSONRPC function "{key}" with params {params}',
    110         url=self._url,
    111         code=err.code,
    112         data=err.data,
    113     ) from err
    115 if not res:
    116     raise CommandError(
    117         f'JSON response not received from JSONRPC function "{key}" with params {params}',
    118         url=self._url,
    119     )

CommandError: *** (http://lg03a12.chimera.hpc.mssm.edu:43002, code 500) Encounted error from JSONRPC function "get_project_symlinks" with params ('P45',)
```

Welcome to the forum @Iden.
It may be possible to avoid the timeout by specifying a more generous timeout limit when accessing the icli:

CRYOSPARC_CLIENT_TIMEOUT=1000 cryosparcm icli

One may similarly run the get_project_symlinks command directly in the Linux shell

CRYOSPARC_CLIENT_TIMEOUT=1000 cryosparcm cli "get_project_symlinks('P45')"

Does this help?

Thank you for your response. Unfortunately, I am still receiving the same timeout error.

In [3]: cli.get_project_symlinks('P45')
<ipython-input-3-a1cf2006d2ca>:1: UserWarning: *** CommandClient: command (http://lg03a12.chimera.hpc.mssm.edu:43002/api) did not reply within timeout of 1000 seconds, attempt 1 of 3
  cli.get_project_symlinks('P45')
<ipython-input-3-a1cf2006d2ca>:1: UserWarning: *** CommandClient: command (http://lg03a12.chimera.hpc.mssm.edu:43002/api) did not reply within timeout of 1000 seconds, attempt 2 of 3
  cli.get_project_symlinks('P45')
---------------------------------------------------------------------------
CommandError                              Traceback (most recent call last)
File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/cryosparc_tools/cryosparc/command.py:105, in CommandClient._get_callable.<locals>.func(*args, **kwargs)
    104 try:
--> 105     with make_json_request(self, "/api", data=data, _stacklevel=4) as request:
    106         res = json.loads(request.read())

File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/contextlib.py:135, in _GeneratorContextManager.__enter__(self)
    134 try:
--> 135     return next(self.gen)
    136 except StopIteration:

File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/cryosparc_tools/cryosparc/command.py:226, in make_request(client, method, url, query, data, headers, _stacklevel)
    224         attempt += 1
--> 226 raise CommandError(error_reason, url=url, code=code, data=resdata)

CommandError: *** (http://lg03a12.chimera.hpc.mssm.edu:43002/api, code 500) Timeout Error

The above exception was the direct cause of the following exception:

CommandError                              Traceback (most recent call last)
Cell In[3], line 1
----> 1 cli.get_project_symlinks('P45')

File /sc/arion/projects/glycoprotein/cryosparc/software/cryosparc_master/cryosparc_tools/cryosparc/command.py:108, in CommandClient._get_callable.<locals>.func(*args, **kwargs)
    106         res = json.loads(request.read())
    107 except CommandError as err:
--> 108     raise CommandError(
    109         f'Encounted error from JSONRPC function "{key}" with params {params}',
    110         url=self._url,
    111         code=err.code,
    112         data=err.data,
    113     ) from err
    115 if not res:
    116     raise CommandError(
    117         f'JSON response not received from JSONRPC function "{key}" with params {params}',
    118         url=self._url,
    119     )

CommandError: *** (http://lg03a12.chimera.hpc.mssm.edu:43002, code 500) Encounted error from JSONRPC function "get_project_symlinks" with params ('P45',)

In [4]: 

Thanks @Iden for trying that. What is the output of the following command on a Linux shell on the CryoSPARC master service:

date && (find $(cryosparcm cli "get_project_dir_abs('P45')") -type l | wc -l) && date

The command

  • should return 3 lines of output
  • may take (significantly) longer than 1000 seconds
  • hopefully does not also time out

I received the following:

[gp-cryoadmin@lg03a12 cryosparc]$ date && (find $(cryosparcm cli "get_project_dir_abs('P45')") -type l | wc -l) && date
Tue Dec 23 06:46:01 PM EST 2025
3571740
Tue Dec 23 06:46:14 PM EST 2025

Thank you.

That’s a large number of links! Out of curiosity: How many jobs and movies does this project involve?
Given the large number of links, did you consider identifying broken links at the job level using the get_job_symlinks() cli function for relevant import, such as Import Movies, jobs?

there are 67 jobs and ~45k movies. I have also struggled to get the get_job_symlinks() function to work.

Please can you describe the problem that you observed with the get_job_symlinks() and let us know the project and job IDs that you specified for that command at that time?