[Biopython] [Entrez.efetch] save records

Peter Cock p.j.a.cock at googlemail.com
Thu Dec 3 23:58:21 UTC 2015


Hmm. I would keep the data as the original XML, and parse it
on demand. That should work regardless of the version of
Python and Biopython (or indeed, if you switched to Ruby etc).
Python's pickles are not consistent between versions (especially
mixing Python 2 and 3).

In this case the Entrez parser objects are probably not pickle-able :(
Are you interested in trying to fix that?

Peter

On Thu, Dec 3, 2015 at 11:38 PM,  <c.buhtz at posteo.jp> wrote:
> I load a big bunch (10.000's) of records as XML with eFetch from PubMed.
>
> I was able to pickle that list of records to a file with Python3.
>
> But when I try to unpickle it I get this error:
>   File "../pidAsk.py", line 82, in _getRecords
>     record = pickle.load(f)
>   File "/usr/local/lib/python3.4/dist-packages/Bio/Entrez/Parser.py",
> line 117, in __setitem__ if key in self.listkeys:
> AttributeError: 'StructureElement' object has no attribute 'listkeys'
>
> Does someone tried to (un)pickle data like eFetch-PubMed-records with
> Python3?
> --
> GnuPGP-Key ID 0751A8EC
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython


More information about the Biopython mailing list