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

Fix loading error for built in tool sift #18357

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

bernt-matthias
Copy link
Contributor

This annoyed me for way to long.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Error popping up all the time:

```
Traceback (most recent call last):
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tool_util/toolbox/base.py", line 873, in _load_tool_tag_set
    tool = self.load_tool(concrete_path, use_cached=False, tool_cache_data_dir=tool_cache_data_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tool_util/toolbox/base.py", line 1100, in load_tool
    tool = self.create_tool(
           ^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 547, in create_tool
    return self._create_tool_from_source(tool_source, config_file=config_file, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 563, in _create_tool_from_source
    return create_tool_from_source(self.app, tool_source, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 355, in create_tool_from_source
    tool = ToolClass(config_file, tool_source, app, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 820, in __init__
    raise e
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 817, in __init__
    self.parse(tool_source, guid=guid, dynamic=dynamic)
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 1142, in parse
    self.parse_inputs(self.tool_source)
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 1427, in parse_inputs
    inputs = self.parse_input_elem(page_source, enctypes)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 1622, in parse_input_elem
    param = self.parse_param_elem(input_source, enctypes, context)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 1635, in parse_param_elem
    param = ToolParameter.build(self, input_source)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/basic.py", line 330, in build
    return parameter_types[param_type](tool, input_source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/basic.py", line 2071, in __init__
    super().__init__(tool, input_source, trans)
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/basic.py", line 1863, in __init__
    super().__init__(tool, input_source)
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/basic.py", line 186, in __init__
    self.validators.append(validation.Validator.from_element(self, elem))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/validation.py", line 45, in from_element
    return validator_types[_type].from_element(param, elem)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/validation.py", line 399, in from_element
    assert os.path.exists(filename), f"File {filename} specified by the 'filename' attribute not found"
AssertionError: File /gpfs1/data/galaxy_server/galaxy/tool-data/sift_db.loc specified by the 'filename' attribute not found
```

I think using the other validator should not cause so much trouble.
apparently data tables need a value column
@jmchilton jmchilton merged commit 81a00cb into galaxyproject:dev Jun 10, 2024
48 of 50 checks passed
Copy link

This PR was merged without a "kind/" label, please correct.

@bernt-matthias bernt-matthias deleted the sift-fix branch June 10, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants