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

Ignore #header row for csv tables #90

Open
will-moore opened this issue Oct 12, 2021 · 0 comments
Open

Ignore #header row for csv tables #90

will-moore opened this issue Oct 12, 2021 · 0 comments

Comments

@will-moore
Copy link
Member

Just got a bug report from a user trying to use OMERO.parade on a Dataset at https://demo.openmicroscopy.org/webclient/?show=dataset-6308
This bug report was actually due to the user trying to filter using a csv that had the #header for populate script, so that the column names are not read correctly and therefore the first value added at

column_data[name].append(value.strip())

is the actual column name, so that all columns contain at least 1 string. So this fails:

            # try to convert to number (if not empty string)
            values = [float(v) if len(v) > 0 else v for v in values]

and we get this exception:

File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_parade/views.py" in filter_script
  128.                 return module.get_script(request, filter_name, conn)

File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_parade/csv_filters/omero_filters.py" in get_script
  194.                       'default': table_cols[0],

Exception Type: IndexError at /parade/filters/script/metadata.csv/
Exception Value: list index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant