Skip to content

Commit 6f12003

Browse files
author
Pawel Rzonca
committed
fix error msg
1 parent 0edc667 commit 6f12003

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngio/tables/v1/_roi_table.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def _dataframe_to_rois(
8686
) -> dict[str, Roi]:
8787
"""Convert a DataFrame to a WorldCooROI object."""
8888
# Validate the columns of the DataFrame
89-
_required_columns = set(dataframe.columns).intersection(set(required_columns))
90-
if len(_required_columns) != len(required_columns):
89+
_missing_columns = set(required_columns).difference(set(dataframe.columns))
90+
if len(_missing_columns) != 0:
9191
raise NgioTableValidationError(
92-
f"Could not find required columns: {_required_columns} in the table."
92+
f"Could not find required columns: {_missing_columns} in the table."
9393
)
9494

9595
extra_columns = set(dataframe.columns).difference(

0 commit comments

Comments
 (0)