From 01a121a725a63109feaebdd9da7968ac881c7c53 Mon Sep 17 00:00:00 2001 From: anjakefala Date: Thu, 16 Nov 2023 22:25:22 -0800 Subject: [PATCH] [join-] improve error message for inconsistent key columns Multiple messages are now identical and get batched into a single line. Mention sheets names and column names instead of values. Offer guidance for fixing. --- visidata/features/join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visidata/features/join.py b/visidata/features/join.py index 4bf2a8d32..85a0b4c08 100644 --- a/visidata/features/join.py +++ b/visidata/features/join.py @@ -137,7 +137,7 @@ def calcValue(self, row): if row[c.sheet] is not None: vals.add(c.getTypedValue(row[c.sheet])) if len(vals) != 1: - vd.warning(f'inconsistent keys: ' + str(vals)) + vd.warning(f"The source key columns of {', '.join([col.sheet.name + ':' + col.name for col in self.keycols])}, have different types. Type the source columns before joining.") return vals.pop() def putValue(self, row, value):