datajoint / sci-viz

Generic visualization framework for building dashboarding capabilities for DataJoint pipelines.
https://datajoint.com/docs/core/sci-viz
MIT License
6 stars 12 forks source link

Error while attempting to filter via radio buttons #63

Open kushalbakshi opened 1 year ago

kushalbakshi commented 1 year ago

This error occurs while attempting to filters entries in a table component via the drop-down radio buttons. Currently, none of the columns are able to filter with these radio buttons. Below are two error stacks for two different columns in the table:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/pharus/dynamic_api.py", line 45, in subjecttableattributes
    return component_instance.attributes_route()
  File "/opt/conda/lib/python3.8/site-packages/pharus/component_interface.py", line 335, in attributes_route
    attributes_meta = _DJConnector._get_attributes(
  File "/opt/conda/lib/python3.8/site-packages/pharus/interface.py", line 238, in _get_attributes
    for (v,) in (dj.U(attribute_name) & query).fetch()
  File "/opt/conda/lib/python3.8/site-packages/datajoint/fetch.py", line 256, in __call__
    cur = self._expression.cursor(
  File "/opt/conda/lib/python3.8/site-packages/datajoint/expression.py", line 629, in cursor
    return self.connection.query(sql, as_dict=as_dict)
  File "/opt/conda/lib/python3.8/site-packages/datajoint/connection.py", line 340, in query
    self._execute_query(cursor, query, args, suppress_warnings)
  File "/opt/conda/lib/python3.8/site-packages/datajoint/connection.py", line 296, in _execute_query
    raise translate_query_error(err, query)
datajoint.errors.UnknownAttributeError: Unknown column 'sex' in 'having clause'
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/pharus/dynamic_api.py", line 45, in subjecttableattributes
    return component_instance.attributes_route()
  File "/opt/conda/lib/python3.8/site-packages/pharus/component_interface.py", line 335, in attributes_route
    attributes_meta = _DJConnector._get_attributes(
  File "/opt/conda/lib/python3.8/site-packages/pharus/interface.py", line 238, in _get_attributes
    for (v,) in (dj.U(attribute_name) & query).fetch()
  File "/opt/conda/lib/python3.8/site-packages/datajoint/fetch.py", line 256, in __call__
    cur = self._expression.cursor(
  File "/opt/conda/lib/python3.8/site-packages/datajoint/expression.py", line 629, in cursor
    return self.connection.query(sql, as_dict=as_dict)
  File "/opt/conda/lib/python3.8/site-packages/datajoint/connection.py", line 340, in query
    self._execute_query(cursor, query, args, suppress_warnings)
  File "/opt/conda/lib/python3.8/site-packages/datajoint/connection.py", line 296, in _execute_query
    raise translate_query_error(err, query)
datajoint.errors.UnknownAttributeError: Unknown column 'mlims_name' in 'having clause'

Here is the screenshot of the webpage when the filtering is attempted: image

guzman-raphael commented 1 year ago

@kushalbakshi Could you provide a minimal example schema and spec that results in this error?

kushalbakshi commented 1 year ago

The spec sheet is here and the schema are in the corresponding pipeline here. This table view calls lab.Subject. There are currently two test entries and ~10 entries ingested from the lab's animal colony management database.