Skip to content

Commit 88e6e63

Browse files
committed
Improve error message for unknown attributes in DataSet class
1 parent bea8c31 commit 88e6e63

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

guidata/dataset/datatypes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,9 @@ def create(cls: type[AnyDataSet], **kwargs) -> AnyDataSet:
14191419
if item._name == name:
14201420
break
14211421
else:
1422-
raise AttributeError(f"Unknown attribute {name}")
1422+
raise AttributeError(
1423+
f"DataSet class '{cls.__name__}' has no attribute '{name}'"
1424+
)
14231425

14241426
# Create the instance but skip set_defaults in __init__
14251427
instance = cls(skip_defaults=True)

0 commit comments

Comments
 (0)