Skip to content

error when using celltype filter (and neighbors graph links?) #320

Description

@rheiland

When we have two cell types and try to Apply the filter to hide plotting one cell type (see screenshot), we get an error:

---- vis_base: filterUI_cb()
QLayout::addChildLayout: layout "" already has a parent
view2D_cb():  Plot options
Traceback (most recent call last):
  File "/Users/heiland/miniconda3/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1698, in pandas._libs.hashtable.Float64HashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1722, in pandas._libs.hashtable.Float64HashTable.get_item
KeyError: 1.0

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/heiland/git/studio_dev/bin/vis_base.py", line 1144, in apply_filters
    self.update_plots()
  File "/Users/heiland/git/studio_dev/bin/vis_tab.py", line 348, in update_plots
    self.ax0.plot([xvals[c1], xvals[c2]], [yvals[c1], yvals[c2]], 'k-', lw=0.5)
                              ~~~~~^^^^
  File "/Users/heiland/miniconda3/lib/python3.12/site-packages/pandas/core/series.py", line 1121, in __getitem__
    return self._get_value(key)
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/heiland/miniconda3/lib/python3.12/site-packages/pandas/core/series.py", line 1237, in _get_value
    loc = self.index.get_loc(label)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heiland/miniconda3/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
    raise KeyError(key) from err
KeyError: 1
Abort trap: 6
Image

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions