Skip to content
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

Closed
LeeBergstrand opened this issue Mar 21, 2014 · 6 comments
Closed

Missing Entrez DTDs #303

LeeBergstrand opened this issue Mar 21, 2014 · 6 comments

Comments

@LeeBergstrand
Copy link

/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)

@LeeBergstrand
Copy link
Author

/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.
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 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
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...

@peterjc
Copy link
Member

peterjc commented Mar 22, 2014

Thanks for reporting this, both issues have been fixed.

Missing esummary-v1.dtd was reported on issue #290 and fixed in cb560e7

Missing esearch.dtd was reported on issue #287 and fixed in 6c2e7db

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?

@peterjc peterjc closed this as completed Mar 22, 2014
@LeeBergstrand
Copy link
Author

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.

@LeeBergstrand
Copy link
Author

Or something like that.

@mdehoon
Copy link
Contributor

mdehoon commented Mar 23, 2014

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.

@peterjc
Copy link
Member

peterjc commented Mar 23, 2014

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants