Skip to content

Commit

Permalink
fix bug reported internally
Browse files Browse the repository at this point in the history
treat the corner case for which name is not part of the settings file leading to an error when it tries to replace some characters
  • Loading branch information
chrpetre committed Sep 6, 2024
1 parent 9be981c commit 7c6c770
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ansys/pytwin/evaluate/tbrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def _read_settings(filepath):
namedselection = {}
dimensionality = None
name = None
outputname = None
unit = None

if "namedSelections" in data:
Expand All @@ -121,11 +122,12 @@ def _read_settings(filepath):

if "name" in data:
name = data["name"]
outputname = name.replace(" ", "_")
if "unit" in data:
unit = data["unit"]

tbromns = dict()
outputname = name.replace(" ", "_")


# Create list of name selections indexes
for name, idsList in namedselection.items():
Expand Down

0 comments on commit 7c6c770

Please sign in to comment.