Dear cryosparc team,
I came across an error when accessing the outputs of a job via the API. Similar to the description in the tutorial Generate High-Res 2D Classes on github.
So far I tried several different job_types such as homo_abinit
, select_2D
and class_2D
. But all oft hem failed in the same way, see Bash output.
My versions are 4.2.0 for cryosparc and cryosparc-tools.
python command
# read data from job
templates_selected = c2d_sel_job.load_output("templates_selected", slots=["blob"])
The project P80
does contain a job J141
with the correct file present, ie J141/templates_selected.cs
.
so I was wondering what went wrong at this stage.
The job itself has finished and the results can be access via the GUI, CLI (e.g. get_job_result("P80","J141.templates_selected.blob")
and c2d_sel_job.doc
Bash output
Response from server: b'Invalid file path J141/templates_selected.cs; must be in project directory for P80'
Traceback (most recent call last):
File "/data/cryo-em/manual_processing/em_user/cryosparc/cs_snippets/cs_workflow_playground.py", line 26, in <module>
templates_selected = c2d_sel_job.load_output("templates_selected", slots=["blob"])
File "/home/em_user/.conda/envs/cryosparc_tools_fk/lib/python3.10/site-packages/cryosparc/job.py", line 391, in load_output
datasets = [self.cs.download_dataset(self.project_uid, f) for f in metafiles]
File "/home/em_user/.conda/envs/cryosparc_tools_fk/lib/python3.10/site-packages/cryosparc/job.py", line 391, in <listcomp>
datasets = [self.cs.download_dataset(self.project_uid, f) for f in metafiles]
File "/home/em_user/.conda/envs/cryosparc_tools_fk/lib/python3.10/site-packages/cryosparc/tools.py", line 595, in download_dataset
with self.download(project_uid, path_rel) as response:
File "/home/em_user/.conda/envs/cryosparc_tools_fk/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/home/em_user/.conda/envs/cryosparc_tools_fk/lib/python3.10/site-packages/cryosparc/command.py", line 191, in make_request
raise CommandClient.Error(client, error_reason, url=url)
cryosparc.command.CommandClient.Error: *** CommandClient: (http://localhost:39003/get_project_file) HTTP Error 422 UNPROCESSABLE ENTITY; please check cryosparcm log command_vis for additional information.
Response from server: b'Invalid file path J141/templates_selected.cs; must be in project directory for P80'
cryosparcm log command_vis
2023-07-12 10:12:45,274 VIS.MAIN request_handler INFO | Completed request for get_project_file in 0.00s
2023-07-12 10:17:05,546 VIS.MAIN request_handler INFO | Received request for get_project_file
2023-07-12 10:17:05,549 VIS.MAIN get_project_file ERROR | Invalid file path J141/templates_selected.cs; must be in project directory for P80
2023-07-12 10:17:05,549 VIS.MAIN get_project_file ERROR | NoneType: None