diff --git a/python/triqs_tprf/ParameterCollection.py b/python/triqs_tprf/ParameterCollection.py index e75085fe..5969b7a8 100644 --- a/python/triqs_tprf/ParameterCollection.py +++ b/python/triqs_tprf/ParameterCollection.py @@ -221,6 +221,8 @@ def getattr_from_objects(self, attr): return np.array([getattr(o, attr, None) for o in self.objects ]) def __getattr__(self, attr): + if attr not in self.objects[0].keys(): + raise AttributeError return self.getattr_from_objects(attr) def __reduce_to_dict__(self):