Excellent, that got us running!
We are running into another error though. Based on the message, I’m thinking it is unrecoverable and being caused by corrupted or missing data that got us here in the first place.
Is there a way to run this command on the project so that it skips over broken J numbers and continues? I’m assuming there will be some unrecoverable data as there is a drive loss, but running through job-by-job when there is a broken J could be time consuming.
$ cryosparcm call python ./restore_gridfs_files.py --project P249 --dump
Found 206 to restore
** WARNING: --dump is enabled, gridfs files in the job directory will be reset after successful restore.
Continuing in 5 seconds...
Importing gridfs files for J191...
No files uploaded for J191
Importing gridfs files for J168...
No files uploaded for J168
Importing gridfs files for J96...
... progresses as normal through many J up to 180 ...
Importing gridfs files for J180...
Uploading files for J180 from /gpfs/group/em/cryosparc/rdepaiva/P249/J180/gridfs_data/gridfsdata_0 ...
FILE 62648f4cff95dca12232b8fb J180 P249_J180_1_of_1596_gpfsgroupemcryosparcrdepaivap249j42imported013193768214028661205_21sep14g_00001sq_v01_00002hl1250_00003ed_a_dwmrc.png
FILE 62648f4cff95dca12232b8fe J180 image.png
FILE 62648f4cff95dca12232b900 J180 image.png
FILE 62648f4dff95dca12232b902 J180 P249_J180_1_of_1596_extracted_particles.png
FILE 62648f4dff95dca12232b904 J180 P249_J180_1_of_1596_extracted_particles.pdf
FILE 62648f4dff95dca12232b907 J180 image.png
FILE 62648f4eff95dca12232b909 J180 image.png
FILE 62648f74ff95dca12232b93f J180 P249_J180_lowpass_filtered_images.png
FILE 62648f74ff95dca12232b941 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62648f9cff95dca12232b979 J180 P249_J180_lowpass_filtered_images.png
FILE 62648f9cff95dca12232b97b J180 P249_J180_lowpass_filtered_images.pdf
FILE 62648fc3ff95dca12232b9b3 J180 P249_J180_lowpass_filtered_images.png
FILE 62648fc3ff95dca12232b9b5 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62648feaff95dca12232b9ed J180 P249_J180_lowpass_filtered_images.png
FILE 62648feaff95dca12232b9ef J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649011ff95dca12232ba27 J180 P249_J180_lowpass_filtered_images.png
FILE 62649011ff95dca12232ba29 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649037ff95dca12232ba61 J180 P249_J180_lowpass_filtered_images.png
FILE 62649037ff95dca12232ba63 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649060ff95dca12232ba9b J180 P249_J180_lowpass_filtered_images.png
FILE 62649060ff95dca12232ba9d J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649094ff95dca12232bad5 J180 P249_J180_lowpass_filtered_images.png
FILE 62649094ff95dca12232bad7 J180 P249_J180_lowpass_filtered_images.pdf
FILE 626490caff95dca12232bb0f J180 P249_J180_lowpass_filtered_images.png
FILE 626490caff95dca12232bb11 J180 P249_J180_lowpass_filtered_images.pdf
FILE 626490feff95dca12232bb49 J180 P249_J180_lowpass_filtered_images.png
FILE 626490feff95dca12232bb4b J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649135ff95dca12232bb83 J180 P249_J180_lowpass_filtered_images.png
FILE 62649135ff95dca12232bb85 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649169ff95dca12232bbbd J180 P249_J180_lowpass_filtered_images.png
FILE 62649169ff95dca12232bbbf J180 P249_J180_lowpass_filtered_images.pdf
FILE 6264919eff95dca12232bbf7 J180 P249_J180_lowpass_filtered_images.png
FILE 6264919eff95dca12232bbf9 J180 P249_J180_lowpass_filtered_images.pdf
FILE 626491deff95dca12232bc31 J180 P249_J180_lowpass_filtered_images.png
FILE 626491deff95dca12232bc33 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649211ff95dca12232bc6b J180 P249_J180_lowpass_filtered_images.png
FILE 62649211ff95dca12232bc6d J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649241ff95dca12232bca5 J180 P249_J180_lowpass_filtered_images.png
FILE 62649241ff95dca12232bca7 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649272ff95dca12232bcdf J180 P249_J180_lowpass_filtered_images.png
FILE 62649272ff95dca12232bce1 J180 P249_J180_lowpass_filtered_images.pdf
FILE 6264929dff95dca12232bd19 J180 P249_J180_lowpass_filtered_images.png
FILE 6264929dff95dca12232bd1b J180 P249_J180_lowpass_filtered_images.pdf
FILE 626492c8ff95dca12232bd53 J180 P249_J180_lowpass_filtered_images.png
FILE 626492c8ff95dca12232bd55 J180 P249_J180_lowpass_filtered_images.pdf
FILE 626492feff95dca12232bd8d J180 P249_J180_lowpass_filtered_images.png
FILE 626492feff95dca12232bd8f J180 P249_J180_lowpass_filtered_images.pdf
FILE 6264933bff95dca12232bdc7 J180 P249_J180_lowpass_filtered_images.png
FILE 6264933bff95dca12232bdc9 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649374ff95dca12232be01 J180 P249_J180_lowpass_filtered_images.png
FILE 62649374ff95dca12232be03 J180 P249_J180_lowpass_filtered_images.pdf
FILE 626493a9ff95dca12232be3b J180 P249_J180_lowpass_filtered_images.png
FILE 626493a9ff95dca12232be3d J180 P249_J180_lowpass_filtered_images.pdf
FILE 626493d4ff95dca12232be75 J180 P249_J180_lowpass_filtered_images.png
FILE 626493d4ff95dca12232be77 J180 P249_J180_lowpass_filtered_images.pdf
FILE 6264940fff95dca12232beaf J180 P249_J180_lowpass_filtered_images.png
FILE 6264940fff95dca12232beb1 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649450ff95dca12232bee9 J180 P249_J180_lowpass_filtered_images.png
FILE 62649450ff95dca12232beeb J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649486ff95dca12232bf23 J180 P249_J180_lowpass_filtered_images.png
FILE 62649486ff95dca12232bf25 J180 P249_J180_lowpass_filtered_images.pdf
FILE 626494bdff95dca12232bf5d J180 P249_J180_lowpass_filtered_images.png
FILE 626494bdff95dca12232bf5f J180 P249_J180_lowpass_filtered_images.pdf
FILE 626494f3ff95dca12232bf97 J180 P249_J180_lowpass_filtered_images.png
FILE 626494f3ff95dca12232bf99 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649529ff95dca12232bfd1 J180 P249_J180_lowpass_filtered_images.png
FILE 62649529ff95dca12232bfd3 J180 P249_J180_lowpass_filtered_images.pdf
FILE 62649564ff95dca12232c00b J180 P249_J180_lowpass_filtered_images.png
FILE 62649564ff95dca12232c00d J180 P249_J180_lowpass_filtered_images.pdf
Uploaded 69 files for J180 in 0.56s
Updating database events ...
Updating tile images...
Updating output group images...
Updated 69 event files for J180 in 0.11s
Attempting to clean up old files...
Deleted 69 old files
Dumping job...
WARNING: gridfs files in the job directory will be reset
ERROR: Could not restore J180: Encountered error for method "dump_job_database" with params {'project_uid': 'P249', 'job_uid': 'J180'}:
ServerError: no chunk #0
Traceback (most recent call last):
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 755, in next
chunk = self._next_with_retry()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 747, in _next_with_retry
return self._cursor.next()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/pymongo/cursor.py", line 1246, in next
raise StopIteration
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_command/commandcommon.py", line 194, in wrapper
res = func(*args, **kwargs)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_command/commandcommon.py", line 260, in wrapper
return func(*args, **kwargs)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_command/command_core/__init__.py", line 3549, in dump_job_database
rc.dump_job_database(project_uid = project_uid, job_uid = job_uid, job_completed = job_completed, migration = migration, abs_export_dir = abs_export_dir, logger = logger)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_compute/jobs/runcommon.py", line 356, in dump_job_database
file_object = gridfs.get(objectid.ObjectId(object_id)).read()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 565, in read
chunk_data = self.readchunk()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 528, in readchunk
chunk = self.__chunk_iter.next()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 759, in next
raise CorruptGridFile("no chunk #%d" % self._next_chunk)
gridfs.errors.CorruptGridFile: no chunk #0
Traceback (most recent call last):
File "./restore_gridfs_files.py", line 226, in <module>
restore_job_dir(args.project, job_dir, args.dump)
File "./restore_gridfs_files.py", line 183, in restore_job_dir
cli.dump_job_database(project_uid=puid, job_uid=juid)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_compute/client.py", line 66, in func
+ self._format_server_error(res['error'])
AssertionError: Encountered error for method "dump_job_database" with params {'project_uid': 'P249', 'job_uid': 'J180'}:
ServerError: no chunk #0
Traceback (most recent call last):
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 755, in next
chunk = self._next_with_retry()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 747, in _next_with_retry
return self._cursor.next()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/pymongo/cursor.py", line 1246, in next
raise StopIteration
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_command/commandcommon.py", line 194, in wrapper
res = func(*args, **kwargs)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_command/commandcommon.py", line 260, in wrapper
return func(*args, **kwargs)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_command/command_core/__init__.py", line 3549, in dump_job_database
rc.dump_job_database(project_uid = project_uid, job_uid = job_uid, job_completed = job_completed, migration = migration, abs_export_dir = abs_export_dir, logger = logger)
File "/home_local/hpc/software/cryosparc/cryosparc2_master/cryosparc_compute/jobs/runcommon.py", line 356, in dump_job_database
file_object = gridfs.get(objectid.ObjectId(object_id)).read()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 565, in read
chunk_data = self.readchunk()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 528, in readchunk
chunk = self.__chunk_iter.next()
File "/home_local/hpc/software/cryosparc/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.7/site-packages/gridfs/grid_file.py", line 759, in next
raise CorruptGridFile("no chunk #%d" % self._next_chunk)
gridfs.errors.CorruptGridFile: no chunk #0