[Biopython] Error with py2exe and Entrez functions

Nizar Ghneim abumustafa3 at gmail.com
Thu Mar 4 20:27:59 UTC 2010


Hello All,

I am writing a short script that others would like to use on their own
computers. I decided to use the py2exe tool to create an executable. The
script runs perfectly in Python, but whenever in my exe file, the first line
to access any Bio.Enterez function (such as esearch or efetch), gives me the
following error:

  File "Bio\Entrez\__init__.pyc", line 258, in read
>   File "Bio\Entrez\Parser.pyc", line 108, in read
>   File "Bio\Entrez\Parser.pyc", line 377, in externalEntityRefHandler
> RuntimeError: Unable to load DTD file eSearch_020511.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. In such a
> case, you can download the DTD file from NCBI and install it manually.
>
> Usually, you can find missing DTD files at either
>     http://www.ncbi.nlm.nih.gov/dtd/
> or
>     http://eutils.ncbi.nlm.nih.gov/entrez/query/DTD/
> If you cannot find eSearch_020511.dtd there, you may also try to search
> for it with a search engine such as Google.
>
> Please save eSearch_020511.dtd in the directory
> C:\Python26\dist\library.zip\Bio\Entrez\DTDs
> in order for Bio.Entrez to find it.
> Alternatively, you can save eSearch_020511.dtd in the directory
> Bio/Entrez/DTDs in the Biopython distribution, and reinstall Biopython.
>
> Please also inform the Biopython developers by sending an email to
> biopython-dev at biopython.org to inform us about this missing DTD, so that
> we
> can include it with the next release of Biopython.
>

It seems to me that the py2exe compiler does not grab the necessary DTD
files. How can I solve this?

Thank you in advance,
Nizar Ghneim



More information about the Biopython mailing list