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

AttributeError with newer openbabel #10

Open
multimeric opened this issue Mar 10, 2022 · 0 comments
Open

AttributeError with newer openbabel #10

multimeric opened this issue Mar 10, 2022 · 0 comments

Comments

@multimeric
Copy link

InteractionComplex("some_filename")

Gives me:

Traceback (most recent call last):
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 876, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/prefect/utilities/executors.py", line 467, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "/home/migwell/Programming/DriveGenePipe/driverpipe/arpeggio_tasks.py", line 23, in arpeggio
    return df.assign(arpeggio = df.apply(_row, axis=1))
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/pandas/core/frame.py", line 8833, in apply
    return op.apply().__finalize__(self, method="apply")
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/pandas/core/apply.py", line 727, in apply
    return self.apply_standard()
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/pandas/core/apply.py", line 851, in apply_standard
    results, res_index = self.apply_series_generator()
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/pandas/core/apply.py", line 867, in apply_series_generator
    results[i] = self.f(v)
  File "/home/migwell/Programming/DriveGenePipe/driverpipe/arpeggio_tasks.py", line 17, in _row
    i_complex = InteractionComplex(temp.name)
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/arpeggio/core/interactions.py", line 62, in __init__
    self.ob_mol = self._read_openbabel(filename)
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/arpeggio/core/interactions.py", line 2046, in _read_openbabel
    mol = protein_reader.read_mmcif_to_openbabel(path)
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/arpeggio/core/protein_reader.py", line 88, in read_mmcif_to_openbabel
    mol = _parse_atom_site_openbabel(list(parsed.values())[0])
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/arpeggio/core/protein_reader.py", line 105, in _parse_atom_site_openbabel
    table = ob.OBElementTable()
  File "/home/migwell/miniconda3/envs/driverpipe/lib/python3.9/site-packages/openbabel/__init__.py", line 17, in __getattr__
    raise AttributeError
AttributeError

We should therefore follow the advice:

"import openbabel" is deprecated, instead use "from openbabel import openbabel"'

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

1 participant