-
Notifications
You must be signed in to change notification settings - Fork 823
Closed
Labels
Component-ReadersFormat-ChainReaderChainReader virtual trajectory readerChainReader virtual trajectory readerdefectpersistence
Description
Expected behaviour
ChainReader can be pickled like all the other Readers.
EDIT: not all readers can be pickled...
Actual behaviour
Raises TypeError because it contains a generator object
TypeError: can't pickle generator objects
Code to reproduce the behaviour
import MDAnalysis as mda
import pickle
from MDAnalysis.tests.datafiles import TPR, XTC
u = mda.Universe(TPR, 3*[XTC])
s = pickle.dumps(u.trajectory, protocol=pickle.HIGHEST_PROTOCOL)Currently version of MDAnalysis:
(run python -c "import MDAnalysis as mda; print(mda.__version__)")
0.18.1-dev
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component-ReadersFormat-ChainReaderChainReader virtual trajectory readerChainReader virtual trajectory readerdefectpersistence