'NoneType' object has no attribute 'add_fields' during motion correction using tutorial test data


I’m a sysadmin attempting to setup a cryoSPARC instance for some CryoEM microscopists to use, and I’ve run into some problems when attempting to run through the tutorial using the sample data provided via cryosparcm downloadtest. I can do the Import Movies job without issue, but upon getting to the Motion Correction job, I receive the following error:

[CPU: 94.9 MB]   Project P1 Job J6 Started
[CPU: 94.9 MB]   Master running v3.1.0, worker running v3.1.0
[CPU: 95.4 MB]   Running on lane clustertest
[CPU: 95.4 MB]   Resources allocated: 
[CPU: 95.4 MB]     Worker:  clustertest
[CPU: 95.4 MB]     CPU   :  [0, 1, 2, 3, 4, 5]
[CPU: 95.4 MB]     GPU   :  [0]
[CPU: 95.4 MB]     RAM   :  [0, 1]
[CPU: 95.4 MB]     SSD   :  False
[CPU: 95.4 MB]   --------------------------------------------------------------
[CPU: 95.4 MB]   Importing job module for job type patch_motion_correction_multi...
[CPU: 257.0 MB]  Job ready to run
[CPU: 257.0 MB]  ***************************************************************
[CPU: 257.1 MB]  Traceback (most recent call last):
  File "cryosparc_worker/cryosparc_compute/run.py", line 84, in cryosparc_compute.run.main
  File "cryosparc_worker/cryosparc_compute/jobs/motioncorrection/run_patch.py", line 44, in cryosparc_compute.jobs.motioncorrection.run_patch.run_patch_motion_correction_multi
AttributeError: 'NoneType' object has no attribute 'add_fields'

This mention in the job log is the only instance of the error I can see; all other log output from other commands contains no mention of errors.

The cryoSPARC master instance is running on a CentOS 7 host. The worker I’m using to test this with is an Ubuntu 18.04 host, which mounts the directory containing the cryoSPARC project data and the sample data from the master host via NFS. I’ve setup the worker host in cryoSPARC in both a cluster configuration (using a Slurm partition), and directly as dedicated cryoSPARC worker; both lanes report the same error, however.

I’ve seen in past discussion topics that this error tends to indicate some unspecified issue with the Import Movies job. I’ve tried moving the sample data around to different locations with different permissions, then doing additional Import Movies jobs, but subsequent Motion Correction jobs using those import jobs as inputs still result in the same error.

Unfortunately, due to the total lack of error reporting in the Motion Correction job that would indicate what Python object is null that’s causing the error to occur, or really any sort of indication of what specific thing is causing the error (permissions? missing files? expected values from the import job being missing? who knows), I’m not really sure what more I can offer to help pin down why I’m running into this.

Okay, I was finally able to pin down the cause. The cryoSPARC project folder had been specified in the default location, $HOME, and that variable was apparently kept as the project storage directory rather than resolved to its actual path when the project was saved. The actual path that $HOME resolved to for the cryoSPARC user on the worker host did not match $HOME for the cryoSPARC user on the master host, so the worker had problems looking up elements of the project data when attempting to run the job.

So, feel free to mark this as resolved/closed.

1 Like