FS#48790 - [python-openbabel] Importing pybel throws an IndexError or segfaults

Attached to Project: Arch Linux
Opened by Xyne (Xyne) - Sunday, 03 April 2016, 05:08 GMT
Last edited by freswa (frederik) - Sunday, 10 May 2020, 20:42 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Attempting to import pybel always results in one of the following (which one is random):

Segmentation fault (core dumped)

OR

Traceback (most recent call last):
File "./test.py", line 2, in <module>
import pybel
File "/usr/lib/python3.5/site-packages/pybel.py", line 87, in <module>
descs = _getpluginnames("descriptors")
File "/usr/lib/python3.5/site-packages/pybel.py", line 85, in _getpluginnames
return [x.split()[0] for x in plugins]
File "/usr/lib/python3.5/site-packages/pybel.py", line 85, in <listcomp>
return [x.split()[0] for x in plugins]
IndexError: list index out of range


Steps to reproduce:

#!/usr/bin/env python3
import pybel


Solving the IndexError on line 85 with a conditional list comprehension still generates segfaults. The import never works.
This task depends upon

Closed by  freswa (frederik)
Sunday, 10 May 2020, 20:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  from openbabel import pybel now works (slightly different way to import it in v3 compared to v2).
Comment by Alexander F. Rødseth (xyproto) - Monday, 23 May 2016, 19:28 GMT
Thanks for reporting. I can reproduce the issue. I think upstream must fix this. Please report the issue to the developers of python-openbabel, unless they have already been notified.
Comment by Rikard Falkeborn (Herk) - Monday, 22 January 2018, 21:22 GMT
Upstream applied this fix: https://github.com/openbabel/openbabel/commit/ab7b281935aaf6cdafcccbd8099bfeb5b963c3da
(as of now, this isn't even reproducible due to  FS#52409 ).

Loading...