From dee8278882fc20ec01b894d4dfb93f9f8449066f Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 2 Apr 2024 17:02:34 +0200 Subject: [PATCH 1/2] Ignore user data table errors for now Fixes https://github.com/galaxyproject/galaxy/issues/17822 --- lib/galaxy/tools/parameters/dynamic_options.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index c93665945d26..6412b1a1283c 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -766,7 +766,12 @@ def get_user_options(self, user: User): hdas = user.get_user_data_tables(self.tool_data_table_name) by_dbkey = {} for hda in hdas: - by_dbkey.update(self.hda_to_table_entries(hda, self.tool_data_table_name)) + try: + by_dbkey.update(self.hda_to_table_entries(hda, self.tool_data_table_name)) + except Exception as e: + # This is a bug, `hda_to_table_entries` is not generic enough for certain loc file + # structures, such as for the dada2_species, which doesn't have a dbkey column + log.warning("Failed to read data table bundle entries: %s", e) for data_table_entry in by_dbkey.values(): field_entry = [] for column_key in self.tool_data_table.columns.keys(): From 5bf204a02394fd98f30a898668bc9500b49119c6 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Tue, 2 Apr 2024 17:46:09 +0200 Subject: [PATCH 2/2] Split up into part that actually fails Co-authored-by: Nicola Soranzo --- lib/galaxy/tools/parameters/dynamic_options.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index 6412b1a1283c..0062a2a94aca 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -767,11 +767,13 @@ def get_user_options(self, user: User): by_dbkey = {} for hda in hdas: try: - by_dbkey.update(self.hda_to_table_entries(hda, self.tool_data_table_name)) + table_entries = self.hda_to_table_entries(hda, self.tool_data_table_name) except Exception as e: # This is a bug, `hda_to_table_entries` is not generic enough for certain loc file # structures, such as for the dada2_species, which doesn't have a dbkey column + table_entries = {} log.warning("Failed to read data table bundle entries: %s", e) + by_dbkey.update(table_entries) for data_table_entry in by_dbkey.values(): field_entry = [] for column_key in self.tool_data_table.columns.keys():