<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><p style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; margin-top: 0px !important;" class="">Then how does one parse the output? Entrez.parse used to work, but no longer. Apparently NCBI has made changes to their xml that has broken Entrez.parse. Entrez.read returns a complex data structure that is difficult to parse.</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px;" class="">If one adds "['PubmedArticle']" to line 302 of /Bio/Entrez/Parse.py so that it reads:</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px;" class="">records = self.stack[0]['PubmedArticle']</p><div style="box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; margin-bottom: 0px !important;" class="">this suppresses the error message, but it mysteriously returns only the strings "PubmedArticle" and "PubmedBookArticle" and not the citation. Any ideas?</div><div style="box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; margin-bottom: 0px !important;" class=""><br class=""></div><div style="box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; margin-bottom: 0px !important;" class="">Konrad</div><div style="box-sizing: border-box; margin-top: 0px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; margin-bottom: 0px !important;" class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On 20 Dec 2016, at 05:16, Michiel de Hoon <<a href="mailto:mjldehoon@yahoo.com" class="">mjldehoon@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10px;" class=""><div id="yui_3_16_0_ym19_1_1482206854351_13850" class=""><span class="">Entrez.read works for me for the example shown.</span></div><div id="yui_3_16_0_ym19_1_1482206854351_13898" class=""><br class=""><span class=""></span></div><div id="yui_3_16_0_ym19_1_1482206854351_13899" class=""><span class="">Best,</span></div><div id="yui_3_16_0_ym19_1_1482206854351_13900" class=""><span class="">-Michiel</span></div> <div class="qtdSeparateBR"><br class=""><br class=""></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 10px;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" class=""> <div dir="ltr" class=""><font face="Arial" size="2" class=""> On Sunday, December 18, 2016 11:57 AM, Peter Cock <<a href="mailto:p.j.a.cock@googlemail.com" class="">p.j.a.cock@googlemail.com</a>> wrote:<br class=""></font></div> <br class=""><br class=""> <div class="y_msg_container">On Sun, Dec 18, 2016 at 2:50 AM, Peter Cock <<a shape="rect" ymailto="mailto:p.j.a.cock@googlemail.com" href="mailto:p.j.a.cock@googlemail.com" class="">p.j.a.cock@googlemail.com</a>> wrote:<br clear="none" class="">> On Thu, Dec 15, 2016 at 7:37 PM, Konrad Koehler <<a shape="rect" ymailto="mailto:konrad.koehler@mac.com" href="mailto:konrad.koehler@mac.com" class="">konrad.koehler@mac.com</a>> wrote:<br clear="none" class="">>> Hello everyone,<br clear="none" class="">>><br clear="none" class="">>> I have been using Entrez.parse for years without any errors. However just<br clear="none" class="">>> in the last day or two, it stopped working. I have been able to reproduce<br clear="none" class="">>> the error using the following example from the biopython Package Entrez<br clear="none" class="">>> documentation:<br clear="none" class="">>><br clear="none" class="">><br clear="none" class="">> I can reproduce this. The XML looks sensible, two <PubmedArticle><br clear="none" class="">> tags:<br clear="none" class="">><br clear="none" class="">> <?xml version="1.0" ?><br clear="none" class="">> <!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st<br clear="none" class="">> January 2017//EN"<br clear="none" class="">> "<a shape="rect" href="https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd" target="_blank" class="">https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd</a>"><br clear="none" class="">> <PubmedArticleSet><br clear="none" class="">> <PubmedArticle><br clear="none" class="">> <MedlineCitation Status="MEDLINE" Owner="NLM"><br clear="none" class="">> <PMID Version="1">19304878</PMID><br clear="none" class="">> ...<br clear="none" class="">> </MedlineCitation><br clear="none" class="">> <PubmedData><br clear="none" class="">> ...<br clear="none" class="">> </PubmedData><br clear="none" class="">> </PubmedArticle><br clear="none" class="">> <PubmedArticle><br clear="none" class="">> <MedlineCitation Status="MEDLINE" Owner="NLM"><br clear="none" class="">> <PMID Version="1">14630660</PMID><br clear="none" class="">> ...<br clear="none" class="">> </MedlineCitation><br clear="none" class="">> <PubmedData><br clear="none" class="">> ...<br clear="none" class="">> </PubmedData><br clear="none" class="">> </PubmedArticle><br clear="none" class="">> </PubmedArticleSet><br clear="none" class="">><br clear="none" class="">> Note however it is using a new DTD file for Jan 2017,<br clear="none" class="">><br clear="none" class="">> <a shape="rect" href="https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd" target="_blank" class="">https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd</a><br clear="none" class="">><br clear="none" class="">><br clear="none" class="">>> Does anyone have any suggestions on how to get Entrez.parse working again? I<br clear="none" class="">>> am also curious why this stopped working. Has the NCBI server changed?<br clear="none" class="">>><br clear="none" class="">><br clear="none" class="">> I would guess that the NCBI changed something subtly. Michiel?<br clear="none" class="">><br clear="none" class="">> Peter<br clear="none" class=""><br clear="none" class="">Logged on GitHub,<br clear="none" class=""><br clear="none" class=""><a shape="rect" href="https://github.com/biopython/biopython/issues/1027" target="_blank" class="">https://github.com/biopython/biopython/issues/1027</a><div class="yqt5514597011" id="yqtfd52192"><br clear="none" class=""><br clear="none" class="">Peter<br clear="none" class=""></div><br class=""><br class=""></div> </div> </div> </div></div></div></div></blockquote></div><br class=""></body></html>