mbari-org / vars-gridview

VARS GridView is a tool for reviewing and correcting VARS localizations in bulk.
MIT License
1 stars 0 forks source link

sorting is failing #38

Closed lonnylundsten closed 7 months ago

lonnylundsten commented 7 months ago

Sorting is not working at all, this is the error at Beth terminal:

Traceback (most recent call last):
  File "/Users/lonny/.pyenv/versions/3.12.0/lib/python3.12/site-packages/vars_gridview/scripts/run.py", line 314, in _sort_widgets
    self.image_mosaic.sort_rect_widgets(method)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sort_rect_widgets'
Traceback (most recent call last):
  File "/Users/lonny/.pyenv/versions/3.12.0/lib/python3.12/site-packages/vars_gridview/scripts/run.py", line 314, in _sort_widgets
    self.image_mosaic.sort_rect_widgets(method)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sort_rect_widgets'
Traceback (most recent call last):
  File "/Users/lonny/.pyenv/versions/3.12.0/lib/python3.12/site-packages/vars_gridview/scripts/run.py", line 314, in _sort_widgets
    self.image_mosaic.sort_rect_widgets(method)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sort_rect_widgets'
Traceback (most recent call last):
  File "/Users/lonny/.pyenv/versions/3.12.0/lib/python3.12/site-packages/vars_gridview/scripts/run.py", line 314, in _sort_widgets
    self.image_mosaic.sort_rect_widgets(method)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sort_rect_widgets'
Traceback (most recent call last):
  File "/Users/lonny/.pyenv/versions/3.12.0/lib/python3.12/site-packages/vars_gridview/scripts/run.py", line 314, in _sort_widgets
    self.image_mosaic.sort_rect_widgets(method)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sort_rect_widgets'
kevinsbarnard commented 7 months ago

Hi @lonnylundsten, this error seems to indicate that the image mosaic (grid) hasn't been created yet. Are you trying to sort before loading any results? I just tested this prior to running any query and got the same error -- I'll put in a patch that avoids this error and instead shows a warning dialog. But in any case, sorting won't do anything before you have results loaded. Sorting after the results are loaded seems to work as normal on my end, so any more information to reproduce this would be appreciated.

kevinsbarnard commented 7 months ago

I just pushed out v0.4.1 which adds a guard (and warning dialog) against sorting before the grid is loaded.

lonnylundsten commented 7 months ago

I'm pretty sure the grid was loaded. Will double check again as soon as this dive loads.

lonnylundsten commented 7 months ago

It's working now. I'll close the ticket!