Skip to content

Commit 4b60e36

Browse files
committed
fixing a bug preventing to load an environment when the layout is not correct
1 parent df61eaf commit 4b60e36

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Next release
7373
- [FIXED] the `self.skip_if_needed()` was missing for one of the test suite.
7474
- [FIXED] an error in the descirption of the `educ_case14_storage` environment
7575
(wrong sign for the slack generator)
76+
- [FIXED] the environment would not load in case of an incorrect "layout.json"
77+
instead of raising a warning.
7678
- [IMPROVED] error message when forecasts are not correctly set-up
7779

7880
[1.10.3] - 2024-07-12

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Benjamin Donnot'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.10.4.dev0'
25+
release = '1.10.4.dev1'
2626
version = '1.10'
2727

2828

grid2op/MakeEnv/MakeFromPath.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,8 @@ def make_from_dataset_path(
10461046

10471047
# Set graph layout if not None and not an empty dict
10481048
if graph_layout is not None and graph_layout:
1049-
env.attach_layout(graph_layout)
1050-
1049+
try:
1050+
env.attach_layout(graph_layout)
1051+
except EnvError as exc_:
1052+
warnings.warn(f"Error {exc_} while setting the environment layout.")
10511053
return env

grid2op/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Grid2Op
1212
1313
"""
14-
__version__ = '1.10.4.dev0'
14+
__version__ = '1.10.4.dev1'
1515

1616
__all__ = [
1717
"Action",

0 commit comments

Comments
 (0)