From a85f5755f0a2a35806538d626e02095f807040c4 Mon Sep 17 00:00:00 2001 From: Jianli Cheng Date: Mon, 25 Sep 2023 22:50:07 -0700 Subject: [PATCH] Improve Error message --- aimsgb/grain_bound.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aimsgb/grain_bound.py b/aimsgb/grain_bound.py index 8d86780..c47a7bc 100644 --- a/aimsgb/grain_bound.py +++ b/aimsgb/grain_bound.py @@ -468,10 +468,10 @@ def __init__(self, axis, sigma, plane, initial_struct, uc_a=1, uc_b=1): if self.plane in v: self.csl = self.gb_info[self.sigma]["CSL matrix"][i] if self.csl is None: - avail_plane = ", ".join([", ".join([" ".join(map(str, j)) for j in i]) + avail_plane = "', '".join(["', '".join([" ".join(map(str, j)) for j in i]) for i in self.gb_info[self.sigma]["GB plane"]]) raise ValueError(f"The given GB plane '{self.plane_str}' cannot be realized. Choose " - f"the plane in [{avail_plane}]") + f"the plane in ['{avail_plane}']") self.direction = None for i, v in enumerate(self.csl.transpose()): if self.plane == list(v):