From fe8d4620e77649adb2668f2a7de850cd7ee0f8f4 Mon Sep 17 00:00:00 2001 From: orenkiwi Date: Tue, 6 Jan 2026 11:45:52 -0500 Subject: [PATCH] Update data_collections_by_output_name_run_period sql.py Fix the issue when rel_indices tuple only has a single element the sql statement throws an error. This is resolved by removing the trailing comma from the query. --- ladybug/sql.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ladybug/sql.py b/ladybug/sql.py index e6bc8471..dc185812 100644 --- a/ladybug/sql.py +++ b/ladybug/sql.py @@ -421,6 +421,7 @@ def data_collections_by_output_name_run_period(self, output_name, run_period_ind # extract all data of the relevant type from ReportData rel_indices = tuple(row[0] for row in header_rows) + rel_indices = str(rel_indices).replace(',)', ')') query = 'SELECT ReportData.Value, ReportData.TimeIndex ' \ 'FROM ReportData ' \ 'INNER JOIN Time ON ReportData.TimeIndex=Time.TimeIndex ' \