-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Entrez DTDs #303
Comments
/Library/Python/2.7/site-packages/Bio/Entrez/Parser.py:525: UserWarning: Unable to load DTD file esearch.dtd. Bio.Entrez uses NCBI's DTD files to parse XML files returned by NCBI Entrez. For this purpose, please download esearch.dtd from http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd and save it either in directory /Library/Python/2.7/site-packages/Bio/Entrez/DTDs or in directory /Users/lee/.biopython/Bio/Entrez/DTDs in order for Bio.Entrez to find it. Alternatively, you can save esearch.dtd in the directory Please also inform the Biopython developers about this missing DTD, by Proceeding to access the DTD file through the internet... |
Thanks for reporting this, both issues have been fixed. Missing Missing With hindsight the message should have mentioned checking on GitHub or the issue tracker... can you think of a good phrasing which wouldn't be too scary? |
This missing DTD file may have been added to a newer version of Biopython or may have already been added to a development build. Please check https://github.com/biopython/biopython/tree/master/Bio/Entrez/DTDs to see if the missing DTD has been add. If the DTD file is missing from the GitHub repository, please inform the Biopython developers about this missing DTD. Report a bug on https://github.com/biopython/biopython/issues or sign up to our mailing list and emailing us, so that we can include the file with the next release of Biopython. |
Or something like that. |
In the current Biopython source code, Bio.Entrez automatically downloads the DTD and stores it locally, so the message about missing DTDs won't appear any more. |
You're right @mdehoon - I was thinking about the failure case in the new code, which if the auto download fails is currently a simple "Failed to access..." message. That should be rare though? |
/Library/Python/2.7/site-packages/Bio/Entrez/Parser.py:525: UserWarning: Unable to load DTD file esummary-v1.dtd.
Bio.Entrez uses NCBI's DTD files to parse XML files returned by NCBI Entrez.
Though most of NCBI's DTD files are included in the Biopython distribution,
sometimes you may find that a particular DTD file is missing. While we can
access the DTD file through the internet, the parser is much faster if the
required DTD files are available locally.
For this purpose, please download esummary-v1.dtd from
http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060131/esummary-v1.dtd
and save it either in directory
/Library/Python/2.7/site-packages/Bio/Entrez/DTDs
or in directory
/Users/lee/.biopython/Bio/Entrez/DTDs
in order for Bio.Entrez to find it.
Alternatively, you can save esummary-v1.dtd in the directory
Bio/Entrez/DTDs in the Biopython distribution, and reinstall Biopython.
Please also inform the Biopython developers about this missing DTD, by
reporting a bug on https://github.com/biopython/biopython/issues or sign
up to our mailing list and emailing us, so that we can include it with the
next release of Biopython.
Proceeding to access the DTD file through the internet...
warnings.warn(message)
The text was updated successfully, but these errors were encountered: