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

ColumnListParameter fails with IndexError: list index out of range #18865

Closed
galaxyproject-sentryintegration bot opened this issue Sep 21, 2024 · 2 comments · Fixed by #18879
Closed

ColumnListParameter fails with IndexError: list index out of range #18865

galaxyproject-sentryintegration bot opened this issue Sep 21, 2024 · 2 comments · Fixed by #18879

Comments

@galaxyproject-sentryintegration

Not sure of the logic here. The problem is that there are more numerical columns for this metadata type than columns in the file.

Sentry Issue: GALAXY-MAIN-100X

IndexError: list index out of range
(4 additional frame(s) were not displayed)
...
  File "galaxy/tools/parameters/__init__.py", line 525, in _populate_state_legacy
    state[input.name] = input.get_initial_value(request_context, context)
  File "galaxy/tools/parameters/basic.py", line 1536, in get_initial_value
    return super().get_initial_value(trans, other_values)
  File "galaxy/tools/parameters/basic.py", line 1118, in get_initial_value
    options = list(self.get_options(trans, other_values))
  File "galaxy/tools/parameters/basic.py", line 1523, in get_options
    column_list = [column_list[i] for i in numerics]
  File "galaxy/tools/parameters/basic.py", line 1523, in <listcomp>
    column_list = [column_list[i] for i in numerics]

Uncaught exception in exposed API method:
@bgruening
Copy link
Member

The best explanation is that the datatype was wrong?

@wm75
Copy link
Contributor

wm75 commented Sep 24, 2024

This could happen with tabular datasets with a first line with fewer columns than subsequent lines.
In that case, the datatype will detect as many columns as there are on the longest line, which then causes this error when indexing into the first line.

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

Successfully merging a pull request may close this issue.

2 participants