Provided the missing workspaces.json is the only defect of the project directory, you may try the procedure outlined below.
Caution: The procedure described below
- is intended as a recovery procedure under narrow circumstances where no better alternative has been identified. It is not part of routine data management.
- has not been tested for potential downstream effects on the integrity of the project directory or
future processing inside the project. - does not restore CryoSPARC Live Sessions.
The procedure:
-
Preserve a copy of the project directory for the case that the procedure corrupts the project directory.
-
Estimate the workspaces needed with the command (replacing
/path/to/project_diras appropriate)find /path/to/project_dir -maxdepth 2 -name job.json -exec egrep -o '"W[0-9]+"' {} \; | sort | uniq -
Place inside the detached project directory that lacks the
workspaces.jsonfile aworkspaces.jsonfile with contents similar to this example where the project included workspacesW1andW2:[ { "uid": "W1", "uid_num": 1, "title": "Untitled", "description": "A workspace stub to facilitate import of a damaged project.", "created_at": { "$date": "1970-01-01T00:00:00.000Z" }, "created_by_job_uid": null, "workspace_type": "base", "deleted": false }, { "uid": "W2", "uid_num": 2, "title": "Untitled", "description": "A workspace stub to facilitate import of a damaged project.", "created_at": { "$date": "1970-01-01T00:00:00.000Z" }, "created_by_job_uid": null, "workspace_type": "base", "deleted": false } ]Include one object block like
{ "uid": "W1", "uid_num": 1, "title": "Untitled", "description": "A workspace stub to facilitate import of a damaged project.", "created_at": { "$date": "1970-01-01T00:00:00.000Z" }, "created_by_job_uid": null, "workspace_type": "base", "deleted": false }with the correspondingly edited
"uid"and"uid_num"values for each workspace uid identified in the previous step. All but the final workspace object block need to be followed by a comma,character. -
After attachment is complete, workspaces will be lacking some statistics that can be updated by pushing the indicated button
[edited 2025-03-28 to to include uid_num fields]
