Topaz model import in other project fails

I tried to export a Topaz model from Project A to Project B by exporting the results group in Project A and importing the .csg with “Import Results Group”. The job fails with the in this forum frequently described error:

Traceback (most recent call last): File “cryosparc_master/cryosparc_compute/run.py”, line 116, in Traceback (most recent call last): File "cryosparc_master/cryosparc_compute/run.py", line 116, in cryosparc_master.cryosparc_compute.run.main File "/home/em5/Software/cryosprac/cryosparc_worker/cryosparc_compute/jobs/imports/run.py", line 1309, in run_import_result_group assert cs_group_file_dirname.startswith(abs_project_dir + os.sep), \ AssertionError: Result group to import must be located inside the project directory

The folder structure was the following:
Export project A: /CS-project/exports/jobs/topaz_model/.csg
Import project B: /CS-project/imports/jobs/topaz_model/.csg

I also tried to symlink the exported topaz model from project A into the import fold in project B which gave me the same error.

Both projects are stored on the same file server and attached to the same master.

Could anyone help me figure out what I am doing wrong?

The jobs/ directory is unexpected if the result group, not the entire job, has been exported.
Testing this on v4.6.0, I found the path should be something like
/path/to/source_project/exports/groups/J199_topaz_model
One would then link the J199_topaz_model directory into the destination project directory prior to importing the result group.
What version of CryoSPARC do you use?

I am using CryoSPARC v4.6.

Sorry, my fault I wrote the wrong folder structure I was actually using:

Export project A: /CS-project/exports/groups/topaz_model/.csg Import project B: /CS-project/imports/groups/topaz_model/.csg

If I understood you correctly the approach would be:

The export path is: /fileserver/user/source_project/exports/groups/JXXX_toapz_model (this is were CryoSPARC exports the topaz model)

I then tried using ln -s /fileserver/user/source_project/exports/groups/JXXX_toapz_model /fileserver/user/acceptor_project

Unfortunately, this approach did not work for me.

I found the issue

The project directory had for unknown reasons an addition / which resulted in the following mismatch:

Project A: /mnt/project
Project B: /mnt/project/

I fixed it in the cryoSPARC MongoDB database.

Another workaround that worked for me, if one doesn’t want to go into the MongoDB, is to blank out the following code lines (1309):

ef run_import_result_group(job):
    project_uid = job['project_uid']
    job_uid = job['uid']
    abs_project_dir = rc.get_project_dir_abs()
    params = rc.com.get_merged_params(job)

    abs_csg_path = os.path.expandvars(params['blob_path'])
    rc.log("Importing result group from %s" % abs_csg_path)

   # cs_group_file_dirname = os.path.dirname(abs_csg_path)
    #assert cs_group_file_dirname.startswith(abs_project_dir + os.sep), \

This will prevent that an additional / is added which caused the error. The reason why the project path has the / is unclear to me, all other projects don’t have it.

As a feature request, would it be possible to add something like "Result group to import must be located inside the project directory " + cs_group_file_dirname + " " + abs_project_dir’ This makes the troubleshooting a little bit easier and you can directly check if there are mismatches in the folder structure?