<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10px"><div id="yui_3_16_0_ym19_1_1482306275700_10798">In what sense is the current result from Entrez.read more difficult to parse than the previous result from Entrez.parse?</div><div id="yui_3_16_0_ym19_1_1482306275700_10857">As far as I can tell, Entrez.read and Entrez.parse are both working correctly.</div><div id="yui_3_16_0_ym19_1_1482306275700_10868">Best,</div><div id="yui_3_16_0_ym19_1_1482306275700_10884">-Michiel<br></div><div class="qtdSeparateBR"><br><br></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;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> On Tuesday, December 20, 2016 1:43 PM, Konrad Koehler <konrad.koehler@mac.com> wrote:<br></font></div> <br><br> <div class="y_msg_container"><div id="yiv3921693084"><div><div class="yiv3921693084" style="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;">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.</div><div class="yiv3921693084" style="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;">If one adds "['PubmedArticle']" to line 302 of /Bio/Entrez/Parse.py so that it reads:</div><div class="yiv3921693084" style="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;">records = self.stack[0]['PubmedArticle']</div><div class="yiv3921693084" style="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;">this suppresses the error message, but it mysteriously returns only the strings "PubmedArticle" and "PubmedBookArticle" and not the citation. Any ideas?</div><div class="yiv3921693084" style="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;"><br class="yiv3921693084" clear="none"></div><div class="yiv3921693084" style="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;">Konrad</div><div class="yiv3921693084" style="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;"><br class="yiv3921693084" clear="none"></div><div class="yiv3921693084yqt7681181057" id="yiv3921693084yqt08566"><div><blockquote class="yiv3921693084" type="cite"><div class="yiv3921693084">On 20 Dec 2016, at 05:16, Michiel de Hoon <<a rel="nofollow" shape="rect" class="yiv3921693084" ymailto="mailto:mjldehoon@yahoo.com" target="_blank" href="mailto:mjldehoon@yahoo.com">mjldehoon@yahoo.com</a>> wrote:</div><br class="yiv3921693084Apple-interchange-newline" clear="none"><div class="yiv3921693084"><div class="yiv3921693084"><div class="yiv3921693084" 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;"><div class="yiv3921693084" id="yiv3921693084yui_3_16_0_ym19_1_1482206854351_13850"><span class="yiv3921693084">Entrez.read works for me for the example shown.</span></div><div class="yiv3921693084" id="yiv3921693084yui_3_16_0_ym19_1_1482206854351_13898"><br class="yiv3921693084" clear="none"><span class="yiv3921693084"></span></div><div class="yiv3921693084" id="yiv3921693084yui_3_16_0_ym19_1_1482206854351_13899"><span class="yiv3921693084">Best,</span></div><div class="yiv3921693084" id="yiv3921693084yui_3_16_0_ym19_1_1482206854351_13900"><span class="yiv3921693084">-Michiel</span></div> <div class="yiv3921693084qtdSeparateBR"><br class="yiv3921693084" clear="none"><br class="yiv3921693084" clear="none"></div><div class="yiv3921693084yahoo_quoted" style="display:block;"> <div class="yiv3921693084" style="font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10px;"> <div class="yiv3921693084" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div class="yiv3921693084" dir="ltr"><font class="yiv3921693084" face="Arial" size="2"> On Sunday, December 18, 2016 11:57 AM, Peter Cock <<a rel="nofollow" shape="rect" class="yiv3921693084" ymailto="mailto:p.j.a.cock@googlemail.com" target="_blank" href="mailto:p.j.a.cock@googlemail.com">p.j.a.cock@googlemail.com</a>> wrote:<br class="yiv3921693084" clear="none"></font></div> <br class="yiv3921693084" clear="none"><br class="yiv3921693084" clear="none"> <div class="yiv3921693084y_msg_container">On Sun, Dec 18, 2016 at 2:50 AM, Peter Cock <<a rel="nofollow" shape="rect" class="yiv3921693084" ymailto="mailto:p.j.a.cock@googlemail.com" target="_blank" href="mailto:p.j.a.cock@googlemail.com">p.j.a.cock@googlemail.com</a>> wrote:<br class="yiv3921693084" clear="none">> On Thu, Dec 15, 2016 at 7:37 PM, Konrad Koehler <<a rel="nofollow" shape="rect" class="yiv3921693084" ymailto="mailto:konrad.koehler@mac.com" target="_blank" href="mailto:konrad.koehler@mac.com">konrad.koehler@mac.com</a>> wrote:<br class="yiv3921693084" clear="none">>> Hello everyone,<br class="yiv3921693084" clear="none">>><br class="yiv3921693084" clear="none">>> I have been using Entrez.parse for years without any errors. However just<br class="yiv3921693084" clear="none">>> in the last day or two, it stopped working. I have been able to reproduce<br class="yiv3921693084" clear="none">>> the error using the following example from the biopython Package Entrez<br class="yiv3921693084" clear="none">>> documentation:<br class="yiv3921693084" clear="none">>><br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">> I can reproduce this. The XML looks sensible, two <PubmedArticle><br class="yiv3921693084" clear="none">> tags:<br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">> <?xml version="1.0" ?><br class="yiv3921693084" clear="none">> <!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st<br class="yiv3921693084" clear="none">> January 2017//EN"<br class="yiv3921693084" clear="none">> "<a rel="nofollow" shape="rect" class="yiv3921693084" target="_blank" href="https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd">https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd</a>"><br class="yiv3921693084" clear="none">> <PubmedArticleSet><br class="yiv3921693084" clear="none">> <PubmedArticle><br class="yiv3921693084" clear="none">> <MedlineCitation Status="MEDLINE" Owner="NLM"><br class="yiv3921693084" clear="none">> <PMID Version="1">19304878</PMID><br class="yiv3921693084" clear="none">> ...<br class="yiv3921693084" clear="none">> </MedlineCitation><br class="yiv3921693084" clear="none">> <PubmedData><br class="yiv3921693084" clear="none">> ...<br class="yiv3921693084" clear="none">> </PubmedData><br class="yiv3921693084" clear="none">> </PubmedArticle><br class="yiv3921693084" clear="none">> <PubmedArticle><br class="yiv3921693084" clear="none">> <MedlineCitation Status="MEDLINE" Owner="NLM"><br class="yiv3921693084" clear="none">> <PMID Version="1">14630660</PMID><br class="yiv3921693084" clear="none">> ...<br class="yiv3921693084" clear="none">> </MedlineCitation><br class="yiv3921693084" clear="none">> <PubmedData><br class="yiv3921693084" clear="none">> ...<br class="yiv3921693084" clear="none">> </PubmedData><br class="yiv3921693084" clear="none">> </PubmedArticle><br class="yiv3921693084" clear="none">> </PubmedArticleSet><br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">> Note however it is using a new DTD file for Jan 2017,<br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">> <a rel="nofollow" shape="rect" class="yiv3921693084" target="_blank" href="https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd">https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_170101.dtd</a><br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">>> Does anyone have any suggestions on how to get Entrez.parse working again? I<br class="yiv3921693084" clear="none">>> am also curious why this stopped working. Has the NCBI server changed?<br class="yiv3921693084" clear="none">>><br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">> I would guess that the NCBI changed something subtly. Michiel?<br class="yiv3921693084" clear="none">><br class="yiv3921693084" clear="none">> Peter<br class="yiv3921693084" clear="none"><br class="yiv3921693084" clear="none">Logged on GitHub,<br class="yiv3921693084" clear="none"><br class="yiv3921693084" clear="none"><a rel="nofollow" shape="rect" class="yiv3921693084" target="_blank" href="https://github.com/biopython/biopython/issues/1027">https://github.com/biopython/biopython/issues/1027</a><div class="yiv3921693084yqt5514597011" id="yiv3921693084yqtfd52192"><br class="yiv3921693084" clear="none"><br class="yiv3921693084" clear="none">Peter<br class="yiv3921693084" clear="none"></div><br class="yiv3921693084" clear="none"><br class="yiv3921693084" clear="none"></div> </div> </div> </div></div></div></div></blockquote></div></div><br class="yiv3921693084" clear="none"></div></div><br><br></div> </div> </div> </div></div></body></html>