diff --git a/bluecellulab/circuit/config/sections.py b/bluecellulab/circuit/config/sections.py index c85283f0..d589f401 100644 --- a/bluecellulab/circuit/config/sections.py +++ b/bluecellulab/circuit/config/sections.py @@ -19,11 +19,18 @@ from pydantic import field_validator, Field from pydantic.dataclasses import dataclass -from libsonata._libsonata import Conditions as LibSonataConditions import neuron import bluecellulab +# libsonata reorganized it's module layout; maintain compatibility with both: +# https://github.com/BlueBrain/libsonata/pull/345 +try: + from libsonata._libsonata import Conditions as LibSonataConditions +except ImportError: + from libsonata._libsonata import SimulationConfig + LibSonataConditions = SimulationConfig.Conditions + def string_to_bool(value: str) -> bool: """Convert a string to a boolean."""