Skip to content

[BUG] Process isinstance check can fail in trajectory code during lazy import #499

@lohedges

Description

@lohedges

This isinstance check for Process objects

# BioSimSpace process.
if process is not None:
if isinstance(process, _Process):
self._process = process
process_name = process.__class__.__name__
# Check that the process can generate a trajectory.
if not self._process._has_trajectory:
raise ValueError(
"BioSimSpace.Process.%s cannot generate a trajectory!"
% process_name
)
else:
raise TypeError("'process' must be of type 'BioSimSpace.Process'.")
can fail due to lazy importing, particularly for derived process classes, i.e. those that derive from Process.OpenMM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions