Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception in exposed API method: TypeError #19609

Open
afgane opened this issue Feb 13, 2025 · 2 comments
Open

Uncaught exception in exposed API method: TypeError #19609

afgane opened this issue Feb 13, 2025 · 2 comments

Comments

@afgane
Copy link
Contributor

afgane commented Feb 13, 2025

Describe the bug
After running the data_manager_gemini_download/0.20.1+galaxy1, trying to load GEMINI load tool (v0.20.1+galaxy2), I get the following error in the web handler and the tool form does not load reporting Uncaught exception in exposed API method error:

uvicorn.access INFO 2025-02-13 17:47:57,698 [pN:main.1,p:21,tN:MainThread] 10.42.0.18:42704 - "GET /api/tool_shed_repositories?name=data_manager_gemini_database_downloader&owner=iuc HTTP/1.0" 200
galaxy.web.framework.decorators ERROR 2025-02-13 17:47:58,362 [pN:main.1,p:21,tN:WSGI_0] Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/galaxy/server/lib/galaxy/web/framework/decorators.py", line 346, in decorator
    rval = func(self, trans, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/webapps/galaxy/api/tools.py", line 250, in build
    return tool.to_json(trans, kwd.get("inputs", kwd), history=history)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/tools/__init__.py", line 2646, in to_json
    populate_state(request_context, self.inputs, params.__dict__, state_inputs, state_errors)
  File "/galaxy/server/lib/galaxy/tools/parameters/__init__.py", line 436, in populate_state
    _populate_state_legacy(
  File "/galaxy/server/lib/galaxy/tools/parameters/__init__.py", line 567, in _populate_state_legacy
    state[input.name] = input.get_initial_value(request_context, context)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/tools/parameters/basic.py", line 1139, in get_initial_value
    options = list(self.get_options(trans, other_values))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/tools/parameters/basic.py", line 988, in get_options
    return self.options.get_options(trans, other_values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/tools/parameters/dynamic_options.py", line 890, in get_options
    options = self.get_fields(trans, other_values)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/tools/parameters/dynamic_options.py", line 766, in get_fields
    options = filter.filter_options(options, trans, other_values)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/galaxy/server/lib/galaxy/tools/parameters/dynamic_options.py", line 538, in filter_options
    return sorted(options, key=lambda x: x[self.column], reverse=self.reverse)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'dict' and 'str'

Galaxy Version and/or server at which you observed the bug
Galaxy Version: 24.2.0
Commit: 2bff8f5

Browser and Operating System
Operating System: Ubuntu 24.04
Browser: Chrome

To Reproduce
Steps to reproduce the behavior:

  1. Install the Gemini data manager and run it
  2. Try to load the Gemini load tool; the error pops up.

Additional context
After running the data manger, the following entry is added to the shed_tool_data_table_conf:

<table name="gemini_versioned_databases" comment_char="#" allow_duplicate_entries="False">
        <columns>value, dbkey, version, name, path</columns>
        <file path="/galaxy/server/database/tool-data/toolshed.g2.bx.psu.edu/repos/iuc/data_manager_gemini_database_downloader/27a6a256cd23/gemini_versioned_databases.loc"/>
        <tool_shed_repository>
            <tool_shed>toolshed.g2.bx.psu.edu</tool_shed>
            <repository_name>data_manager_gemini_database_downloader</repository_name>
            <repository_owner>iuc</repository_owner>
            <installed_changeset_revision>27a6a256cd23</installed_changeset_revision>
        </tool_shed_repository>
    </table>

With the following entry in the .loc file:

2025-02-13      hg19    200     GEMINI annotations w/ GERP & CADD (2025-02-13 snapshot) /galaxy/server/database/tool-data/gemini/200/hg19/2025-02-13

And content existing at the specified path, starting with gemini-config.yaml:

annotation_dir: gemini/data
versions:
  ALL.wgs.phase3_shapeit2_mvncall_integrated_v5a.20130502.sites.tidy.vcf.gz: 4
  ESP6500SI.all.snps_indels.tidy.v2.vcf.gz: 2
  ExAC.r0.3.sites.vep.tidy.vcf.gz: 4
  GRCh37-gms-mappability.vcf.gz: 2
  clinvar_20170130.tidy.vcf.gz: 5
  cosmic-v68-GRCh37.tidy.vcf.gz: 3
  dbsnp.b147.20160601.tidy.vcf.gz: 1
  detailed_gene_table_v75: 2
  geno2mp.variants.tidy.vcf.gz: 1
  gnomad.exomes.r2.0.1.sites.no-VEP.nohist.tidy.vcf.gz: 2
  hg19.rmsk.bed.gz: 2
  summary_gene_table_v75: 2
  whole_genome_SNVs.tsv.compressed.gz: 2
@mvdbeek
Copy link
Member

mvdbeek commented Feb 14, 2025

Does this also fail if you use a different Galaxy user account or delete the data_manager.json file that the data manager generated ?

@afgane
Copy link
Contributor Author

afgane commented Feb 14, 2025

Loading the tool form by a different Galaxy user works fine, including running the tool. Loading it by the admin user that ran the DM continues to fail with the same error.

I cannot find data_manager.json anywhere though so can't give that a try.

mvdbeek added a commit to mvdbeek/galaxy that referenced this issue Feb 19, 2025
This is a little cleaner. Also replaces the `list[tuple[str, str,
bool]]` return type of get_options with a NamedTuple.

Fixes galaxyproject#19609
mvdbeek added a commit to mvdbeek/galaxy that referenced this issue Feb 19, 2025
This is a little cleaner. Also replaces the `list[tuple[str, str,
bool]]` return type of get_options with a NamedTuple.

Fixes galaxyproject#19609
mvdbeek added a commit to mvdbeek/galaxy that referenced this issue Feb 19, 2025
This is a little cleaner. Also replaces the `list[tuple[str, str,
bool]]` return type of get_options with a NamedTuple.

Fixes galaxyproject#19609
mvdbeek added a commit to mvdbeek/galaxy that referenced this issue Feb 19, 2025
This is a little cleaner. Also replaces the `list[tuple[str, str,
bool]]` return type of get_options with a NamedTuple.

Fixes galaxyproject#19609
mvdbeek added a commit to mvdbeek/galaxy that referenced this issue Feb 19, 2025
This is a little cleaner. Also replaces the `list[tuple[str, str,
bool]]` return type of get_options with a NamedTuple.

Fixes galaxyproject#19609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants