[Biopython] expat and biopython 1.58 problem on linux x64

Peter Cock p.j.a.cock at googlemail.com
Fri Oct 28 09:54:09 UTC 2011


On Thu, Oct 27, 2011 at 9:33 PM, Jaime Tovar <jmtc21 at bath.ac.uk> wrote:
> Hello all,
>
> I'm having troubles while updating my biopython to 1.58.
>
> I'm having exactly the same problem with the xml parser as described in this
> old post:
>
> http://www.biopython.org/pipermail/biopython/2011-May/007263.html
>
> Sadly I may have to use the entrez module so it will make me happy to have
> the thing running if possible.
>
> I'm installing in a opensuse 11.3 x64 box
> Did a rpm install of biopython from the opensuse science repo. So I have
> 1.58-1.2 installed.
> Python 1.6.5-3.5.1 for x64
> expat 2.0.1-98.1 x64
>
> Tried to install both by hand from the tar.gz and using an rpm but the
> problem persists.
>
> Any help will be greatly appreciated.
>
> Thanks!!!
>
> Jaime.

Hmm. Can you try installing the latest code from git please?
You can grab it via the git command line tool, or use github
to download the latest code as a tar ball:
http://biopython.org/wiki/SourceCode

Specifically I'm hoping this change will fix the segmentation
fault (assuming http://bugs.python.org/issue4877 is to blame):
https://github.com/biopython/biopython/commit/59f9cbd2ad14ebd05d5864033ff0c7ef7a8f0daa

Previously:

$ python
Python 2.6.6 (r266:84292, Aug 31 2010, 16:21:14)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio import Entrez
>>> handle = open("NEWS")
>>> handle.close()
>>> Entrez.read(handle)
Segmentation fault

With the fix:

$ python
Python 2.6.6 (r266:84292, Aug 31 2010, 16:21:14)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio import Entrez
>>> handle = open("NEWS")
>>> handle.close()
>>> Entrez.read(handle)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Bio/Entrez/__init__.py", line 270, in read
    record = handler.read(handle)
  File "Bio/Entrez/Parser.py", line 167, in read
    raise IOError("Can't parse a closed handle")
IOError: Can't parse a closed handle

Assuming you start seeing the IOError instead, the question
would shift to what is going on with your network settings
(e.g. look at proxies).

If the segmentation fault doesn't go away we'll need to think
again.

Peter



More information about the Biopython mailing list