Heterogeneous refinement issue - 'NoneType' object is not subscriptable


I’m new in cryo-EM data processing and I’m trying to do the heterogeneous refinement, but I got this error message:

Traceback (most recent call last):
  File "cryosparc2_worker/cryosparc2_compute/run.py", line 82, in cryosparc2_compute.run.main
  File "cryosparc2_worker/cryosparc2_compute/jobs/hetero_refine/run.py", line 476, in cryosparc2_compute.jobs.hetero_refine.run.run_hetero_refine
TypeError: 'NoneType' object is not subscriptable

Does anyone know what this means?

What I did for now:

  1. Rounds of 2D classification (remove some junks)
  2. Ab-initio reconstruction with 3 classes
  3. Heterogeneous refinement. My inputs for heterogeneous refinement are: the 3 volumes from ab-initio reconstruction and all particles from ab-initio reconstruction.

Am I missing something?


Hi @fernandesj, do you happen to have the “Show plots from intermediate steps” option disabled? Can you try enabling it as per this post?

1 Like

Hi @nfrasser, thank you for your reply. I had the “Show plots from intermediate steps” disabled. I’ve started the job again without changing this option (leaving it on) and it is working now. Thank you so much!

1 Like

@fernandesj FYI this option is now fixed in the latest cryoSPARC v2.15, feel free to disable intermediate plots after you update!

1 Like

The error is self-explanatory. You are trying to subscript an object which you think is a list or dict, but actually is None. This means that you tried to do:


This error means that you attempted to index an object that doesn’t have that functionality. You might have noticed that the method sort() that only modify the list have no return value printed – they return the default None. ‘NoneType’ object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn’t define the getitem method . This is a design principle for all mutable data structures in Python.

Visit this site to got a solution for errors.
typeerror nonetype object is not subscriptable