Skip to content

Commit 9b139b8

Browse files
Merge pull request #2584 from pybamm-team/spyder-entry-points
#2534 fix spyder entry points
2 parents 5c750ff + c0eb90a commit 9b139b8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
## Bug fixes
1212

13+
- Fixed bug with `EntryPoints` in Spyder IDE ([#2584](https://github.com/pybamm-team/PyBaMM/pull/2584))
1314
- Fixed electrolyte conservation when options {"surface form": "algebraic"} are used
1415
- Fixed "constant concentration" electrolyte model so that "porosity times concentration" is conserved when porosity changes ([#2529](https://github.com/pybamm-team/PyBaMM/pull/2529))
1516
- Fix installation on `Google Colab` (`pybtex` and `Colab` issue) ([#2526](https://github.com/pybamm-team/PyBaMM/pull/2526))

pybamm/parameters/parameter_sets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ def __load_entry_point__(self, key) -> callable:
5757
if key not in self.__all_parameter_sets:
5858
raise KeyError(f"Unknown parameter set: {key}")
5959
ps = self.__all_parameter_sets[key]
60-
if isinstance(ps, importlib_metadata.EntryPoint):
60+
try:
6161
ps = self.__all_parameter_sets[key] = ps.load()
62+
except AttributeError:
63+
pass
6264
return ps
6365

6466
def __iter__(self):

0 commit comments

Comments
 (0)