2D classification error: AssertionError: Dataset was the wrong length! Expected 167 got 184, Exposure UID: 1

Hello,

I have another issue in Live: suddenly the 2D classification stopped working, and if I try to restart (cannot do it in the Live GUI as the error message prevents me from clicking anything in there), I get the same error:

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_streaming.py", line 133, in cryosparc_compute.jobs.class2D.run_streaming.run_class_2D_streaming
  File "/xxx/cryosparc/cryosparc_worker/cryosparc_compute/jobs/rtp_workers/rtp_common.py", line 415, in dump_particles
    psets = [ import_particles_database_to_dataset(session_doc, exposure_doc, exposure_doc['picker_type'], proj_dir_abs) for exposure_doc in exposures ]
  File "/xxxx/cryosparc/cryosparc_worker/cryosparc_compute/jobs/rtp_workers/rtp_common.py", line 415, in <listcomp>
    psets = [ import_particles_database_to_dataset(session_doc, exposure_doc, exposure_doc['picker_type'], proj_dir_abs) for exposure_doc in exposures ]
  File "/xxxx/cryosparc/cryosparc_worker/cryosparc_compute/jobs/rtp_workers/rtp_common.py", line 258, in import_particles_database_to_dataset
    assert len(dset) == group_data['count'], "Dataset was the wrong length! Expected %d got %d, Exposure UID: %s" % (len(dset), group_data['count'], str(exposure_doc['uid']))
AssertionError: Dataset was the wrong length! Expected 167 got 184, Exposure UID: 1

This also happens if I try to do a 2D classification for selecting a template for picking.

Any help is greatly appreciated!

Hey @LTP,

Can you let us know the exact steps you took that got you to this point?

Hi Stephan,

I realized I copied two times the same micrographs in the directory being watched, so that might have been the issue. I created a new session without these and it worked fine. Does this make sense?

Thanks.

Hi @LTP,

That definitely makes sense. The particles outputted by the cryoSPARC Live Worker job creates particle stacks using the same name as the micrograph they came from. This function tried to look up the particle file from the filesystem using the duplicated file path, which ended up returning the wrong file that had a different number of particles.

This might be worth investigating, can you take a screenshot of what you experience when this happens?