diff --git a/CHANGELOG.md b/CHANGELOG.md index fc701aa0d5..0982b0bb39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## Bug fixes +- Fixed bug with `EntryPoints` in Spyder IDE ([#2584](https://github.com/pybamm-team/PyBaMM/pull/2584)) - Fixed electrolyte conservation when options {"surface form": "algebraic"} are used - Fixed "constant concentration" electrolyte model so that "porosity times concentration" is conserved when porosity changes ([#2529](https://github.com/pybamm-team/PyBaMM/pull/2529)) - Fix installation on `Google Colab` (`pybtex` and `Colab` issue) ([#2526](https://github.com/pybamm-team/PyBaMM/pull/2526)) diff --git a/pybamm/parameters/parameter_sets.py b/pybamm/parameters/parameter_sets.py index 6144d1fdfc..19871f1ee6 100644 --- a/pybamm/parameters/parameter_sets.py +++ b/pybamm/parameters/parameter_sets.py @@ -57,8 +57,10 @@ def __load_entry_point__(self, key) -> callable: if key not in self.__all_parameter_sets: raise KeyError(f"Unknown parameter set: {key}") ps = self.__all_parameter_sets[key] - if isinstance(ps, importlib_metadata.EntryPoint): + try: ps = self.__all_parameter_sets[key] = ps.load() + except AttributeError: + pass return ps def __iter__(self):