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

Fix for csv data loading error after a multi-position event #900

Conversation

annie-xd-wang
Copy link
Collaborator

No description provided.

@AdvancedImagingUTSW
Copy link
Collaborator

One more problem found @annie-xd-wang - When we right-click on the image display and select mark position.

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Spectral\.conda\envs\navigate\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\Users\Spectral\Documents\GitHub\navigate\src\navigate\controller\sub_controllers\camera_view_controller.py", line 458, in mark_position
    stage_position["x"] += offset_x * (-1 if stage_flip_flags["x"] else 1)
TypeError: can only concatenate str (not "int") to str
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Spectral\.conda\envs\navigate\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\Users\Spectral\Documents\GitHub\navigate\src\navigate\controller\sub_controllers\camera_view_controller.py", line 458, in mark_position
    stage_position["x"] += offset_x * (-1 if stage_flip_flags["x"] else 1)
TypeError: can only concatenate str (not "int") to str

@AdvancedImagingUTSW
Copy link
Collaborator

Another one found...

position is invalid
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Spectral\.conda\envs\navigate\lib\site-packages\pandas\core\indexes\base.py", line 3361, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas\_libs\index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 2131, in pandas._libs.hashtable.Int64HashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 2140, in pandas._libs.hashtable.Int64HashTable.get_item
KeyError: 0

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

Traceback (most recent call last):
  File "C:\Users\Spectral\.conda\envs\navigate\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\Users\Spectral\Documents\GitHub\navigate\src\navigate\controller\sub_controllers\multi_position_controller.py", line 157, in handle_double_click
    temp = list(df.loc[rowclicked])
  File "C:\Users\Spectral\.conda\envs\navigate\lib\site-packages\pandas\core\indexing.py", line 931, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "C:\Users\Spectral\.conda\envs\navigate\lib\site-packages\pandas\core\indexing.py", line 1164, in _getitem_axis
    return self._get_label(key, axis=axis)
  File "C:\Users\Spectral\.conda\envs\navigate\lib\site-packages\pandas\core\indexing.py", line 1113, in _get_label
    return self.obj.xs(label, axis=axis)
  File "C:\Users\Spectral\.conda\envs\navigate\lib\site-packages\pandas\core\generic.py", line 3776, in xs
    loc = index.get_loc(key)
  File "C:\Users\Spectral\.conda\envs\navigate\lib\site-packages\pandas\core\indexes\base.py", line 3363, in get_loc
    raise KeyError(key) from err
KeyError: 0
position is invalid
position is invalid
position is invalid
position is invalid

Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 51.06%. Comparing base (fb182fe) to head (3302189).
Report is 4 commits behind head on develop.

Current head 3302189 differs from pull request most recent head 586c903

Please upload reports for the commit 586c903 to get more accurate results.

Files Patch % Lines
...oller/sub_controllers/multi_position_controller.py 0.00% 4 Missing ⚠️
...ntroller/sub_controllers/camera_view_controller.py 0.00% 2 Missing ⚠️
...ate/controller/sub_controllers/stage_controller.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #900      +/-   ##
===========================================
+ Coverage    51.04%   51.06%   +0.01%     
===========================================
  Files          178      178              
  Lines        19054    19055       +1     
===========================================
+ Hits          9727     9730       +3     
+ Misses        9327     9325       -2     
Flag Coverage Δ
unittests 51.06% <30.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AdvancedImagingUTSW AdvancedImagingUTSW merged commit 5a912c1 into TheDeanLab:develop May 24, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants