[Biopython] [Entrez.efetch] save records

Michiel de Hoon mjldehoon at yahoo.com
Sat Dec 5 09:48:10 UTC 2015


I would recommend to save the XML data as XML and parse them using Bio.Entrez. Pickling gets non-trivial when user-defined classes are involved; see the Python documentation for details.-Michiel
 


    On Friday, December 4, 2015 8:38 AM, "c.buhtz at posteo.jp" <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


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20151205/8881133a/attachment.html>


More information about the Biopython mailing list