[Biopython-dev] [Bug 2771] Bio.Entrez.read can't parse XML files from dbSNP (snp database)
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Fri Feb 20 12:58:12 EST 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2771
biopython-bugzilla at maubp.freeserve.co.uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Entrez.efetch: dbSNP not |Bio.Entrez.read can't parse
|supported yet? |XML files from dbSNP (snp
| |database)
------- Comment #2 from biopython-bugzilla at maubp.freeserve.co.uk 2009-02-20 12:58 EST -------
I've retitled the bug to focus on the failure to parse the XML file (there is
no problem in Bio.Entrez.efetch as far as I can tell). For example,
>>> from Bio import Entrez
>>> result = Entrez.read(Entrez.efetch(db='snp', id='9996597', retmode='xml'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Bio/Entrez/__init__.py", line 286, in read
record = handler.run(handle)
File "Bio/Entrez/Parser.py", line 95, in run
self.parser.ParseFile(handle)
File "Bio/Entrez/Parser.py", line 131, in startElement
if object!="":
UnboundLocalError: local variable 'object' referenced before assignment
This may be an NCBI bug, try this:
>>> from Bio import Entrez
>>> print Entrez.efetch(db='snp', id='9996597', retmode='xml').read()
...
Then copy and paste the XML into a validation site like
http://www.validome.org/xml/validate/ where I see an error. On the other hand,
http://validator.w3.org/#validate_by_input seems happy with only a warning.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list