-
Notifications
You must be signed in to change notification settings - Fork 824
Closed
Description
Expected behavior
The offset file should be regenerated when the offset is corrupted.
Actual behavior
Unclear ValueError is raised.
~/anaconda3/envs/yzhuang/lib/python3.8/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
442 # Try a pickle
443 if not allow_pickle:
--> 444 raise ValueError("Cannot load file containing pickled data "
445 "when allow_pickle=False")
446 try:
ValueError: Cannot load file containing pickled data when allow_pickle=FalseCode to reproduce the behavior
#/usr/bin/bash
# generate an empty npz file
touch .md.xtc_offsets.npzimport MDAnalysis as mda
u = mda.Universe('./md.pdb', './md.xtc')
....Possible solution
Add an ValueError exception catch for read_numpy_offsets.
Note
This happened when I tried to process ~100 different trajectories parallelly, but it may not be related to #1988. Might just because I killed the same job beforehand and the offset files ended up corrupted. I will update if that's the case.
Current version of MDAnalysis
- Which version are you using? (run
python -c "import MDAnalysis as mda; print(mda.__version__)") 2.0.0-dev - Which version of Python (
python -V)? 3.8 - Which operating system? Ubuntu
Reactions are currently unavailable