Skip to content

can't pickle PDBReader on python 3 #1981

Description

@kain88-de

Expected behaviour

I'm able to pickle PDBReader under python 3

Actual behaviour

I'm getting an error that TextIOWrapper cannot be pickled.

Code to reproduce the behaviour

import MDAnalysis as mda
from MDAnalysisTests.datafiles import PDB
import pickle

u = mda.Universe(PDB, PDB)
pickle.dumps(u.trajectory)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-d286063031e3> in <module>()
----> 1 pickle.dumps(u.trajectory)

TypeError: cannot serialize '_io.TextIOWrapper' object

....

Currently version of MDAnalysis:

(run python -c "import MDAnalysis as mda; print(mda.__version__)")
0.18.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions