[Biopython-dev] Error in Bio.Entrez.__init__

Maurice Ling mauriceling at gmail.com
Mon Nov 26 14:48:24 UTC 2012


Hi

I am setting an error running this:

from Bio import Entrez
from Bio import Medline
handle = Entrez.efetch(db="pubmed", id=[19300000], rettype="medline",
retmode="text")

The traceback is

Traceback (most recent call last):
  File "C:\Users\Maurice.Ling\Desktop\muscorian\archive\pubmed_dump.py",
line 16, in <module>
    retmode="text")
  File "C:\Python27\lib\site-packages\Bio\Entrez\__init__.py", line 133, in
efetch
    keywords["id"] = ",".join(keywds["id"])
TypeError: sequence item 0: expected string, int found

When I changed line 133 of Bio.Entrez.__init__ from

keywords["id"] = ",".join(keywds["id"])

to

keywords["id"] = ",".join(str(keywds["id"]))

The error disappeared.

Maurice LING
mobile: +1(605)5920300, +6596669233
www: http://maurice.vodien.com
CV: http://maurice.vodien.com/maurice_resume.pdf
Linkedin: http://www.linkedin.com/in/mauriceling
ResearchGate: https://www.researchgate.net/profile/Maurice_HT_Ling



More information about the Biopython-dev mailing list