diff --git a/flexmeasures/data/models/reporting/pandas_reporter.py b/flexmeasures/data/models/reporting/pandas_reporter.py index 1802fe9a16..ff3bbb403f 100644 --- a/flexmeasures/data/models/reporting/pandas_reporter.py +++ b/flexmeasures/data/models/reporting/pandas_reporter.py @@ -349,8 +349,14 @@ def _any_empty(objs): if (_any_empty(args) or _any_empty(kwargs.values())) and skip_if_empty: self.data[df_output] = self.data[df_input] else: - self.data[df_output] = getattr(self.data[df_input], method)( - *args, **kwargs - ) + try: + self.data[df_output] = getattr(self.data[df_input], method)( + *args, **kwargs + ) + except TypeError as exc: + if "unhashable type" in str(exc) and method == "sum": + raise TypeError( + "Consider using 'add' instead of 'sum' as the transformation method." + ) from exc previous_df = df_output