TypeError: object of type ‘NoneType’ has no len() after Clear Intermediate Results

Hi all,

I ran clear intermediate results this morning, it hanged. In the end I stopped it by clearing and killing “clear intermediate results” via Resource manager. Now I can’t start any job.

I am getting this error message:
[CPU: 214.4 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/class2D/run.py”, line 45, in cryosparc_compute.jobs.class2D.run.run_class_2D
File “/opt/cryoSPARC2/cryosparc2_worker/cryosparc_compute/particles.py”, line 31, in init
self.from_dataset(d) # copies in all data
File “/opt/cryoSPARC2/cryosparc2_worker/cryosparc_compute/dataset.py”, line 473, in from_dataset
if len(other) == 0: return self
TypeError: object of type ‘NoneType’ has no len()

I checked folders, particles stacks and motion corrected micrographs, they all look fine, they are not corrupted. I realized there is no job folders being created under project directory folder in my local PC anymore. Could you help me with my problem please?


Hi @Meltem,

Did you run Clear Intermediate Results on the entire project? Also, what version of cryoSPARC are you running?
What are the inputs to your 2D Classification job (i.e., which jobs did the inputs come from)?

Yes, I have run it on the entire project. I am using v3.1.0. The input of 2D classes is a select 2D job.

Hi @Meltem,

That’s odd, the Clear Intermediate Results function shouldn’t affect Select 2D jobs. Can you take a screenshot of the Output tab of the Select 2D job, and expand the “Versions” toggle for each result type?

Great, thanks for sending that. Can you click the icon that allows you to copy the path to the .cs file on the “particles_selected.blob” result to make sure that Iteration 0 and Final Iteration are the same paths? If they are, can you locate the file on your filesystem and make sure it exists?

They have same directory name as following: …P13/J1028/particles_selected.cs. However, there is no cs file in the directory. When I open a new folder and paste the directory cs files are not there, but I have another folder open since morning I can see it there. I will try to copy all files from older version to new version of same folder.

So it seems like the file P13/J1028/particles_selected.cs doesn’t exist, and was deleted by the Clear Intermediate Results function. Are you able to run any other jobs using outputs from jobs that already exist in the project?

Hi Stephan,

It is working now, the path was different, one had a gap.Thank you so much for your quick replies and patience.
Have a good day.