From d1568e65df55c103baa6bf2a96a0cf0e11447c36 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 4 Oct 2023 16:38:18 +0100 Subject: [PATCH] fix(3dplotter): disable optimized loading for older HDF5 compatibility --- pyneuroml/plot/PlotMorphologyVispy.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pyneuroml/plot/PlotMorphologyVispy.py b/pyneuroml/plot/PlotMorphologyVispy.py index 4c37eaa6..2659745f 100644 --- a/pyneuroml/plot/PlotMorphologyVispy.py +++ b/pyneuroml/plot/PlotMorphologyVispy.py @@ -306,15 +306,19 @@ def plot_interactive_3D( print(f"Plotting {nml_file}") if type(nml_file) is str: - nml_model = read_neuroml2_file( - nml_file, - include_includes=False, - check_validity_pre_include=False, - verbose=False, - optimized=True, - ) - # load bits we need to plot the model - load_minimal_morphplottable__model(nml_model, nml_file) + # load without optimization for older HDF5 API + # TODO: check if this is required: must for MultiscaleISN + if nml_file.endswith(".h5"): + nml_model = read_neuroml2_file(nml_file) + else: + nml_model = read_neuroml2_file( + nml_file, + include_includes=False, + check_validity_pre_include=False, + verbose=False, + optimized=True, + ) + load_minimal_morphplottable__model(nml_model, nml_file) if title is None: try: