diff --git a/countess/plugins/join.py b/countess/plugins/join.py index 22b1c4d..fec426a 100644 --- a/countess/plugins/join.py +++ b/countess/plugins/join.py @@ -87,7 +87,11 @@ def process_dataframes(self, dataframe1: pd.DataFrame, dataframe2: pd.DataFrame, drop_index = dataframe2.index.name is None and dataframe2.index.names[0] is None dataframe2 = dataframe2.reset_index(drop=drop_index) - dataframe = dataframe1.merge(dataframe2, **self.join_params) + try: + dataframe = dataframe1.merge(dataframe2, **self.join_params) + except ValueError as exc: + logger.exception(exc) + return pd.DataFrame() if self.parameters["inputs"][0]["drop"].value and join1 in dataframe.columns: dataframe.drop(columns=join1, inplace=True) @@ -102,6 +106,7 @@ def finalize(self, logger: Logger) -> Iterable: assert self.input_columns_1 is not None assert self.input_columns_2 is not None ip1, ip2 = self.parameters["inputs"] + ip1.set_column_choices(self.input_columns_1.keys()) ip2.set_column_choices(self.input_columns_2.keys()) - return [] + yield from super().finalize(logger)