You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description
I am trying to add the functionality to set ROI with a mouse using RangeSelection2D.
However, I am getting the following error after right-clicking the image displayed.
File "/Users/sshiozawa/.edm/envs/python-class/lib/python3.6/site-packages/chaco/linear_mapper.py", line 67, in map_data
return (screen_val - self.low_pos) / self._scale + self.range.low
TypeError: unsupported operand type(s) for -: 'list' and 'float'
i'm able to reproduce this on windows and see below for the full traceback
Traceback (most recent call last):
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\qt4\base_window.py", line 267, in mousePressEvent
self.handler.mousePressEvent(event)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\qt4\base_window.py", line 150, in mousePressEvent
self._enable_window._handle_mouse_event(name + "_down", event)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\abstract_window.py", line 382, in _handle_mouse_event
self.component.dispatch(mouse_event, event_name)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\component.py", line 957, in dispatch
self._new_dispatch(event, suffix)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\component.py", line 1008, in _new_dispatch
tool.dispatch(event, suffix)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\interactor.py", line 104, in dispatch
self._dispatch_stateful_event(event, suffix)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\enable\interactor.py", line 120, in _dispatch_stateful_event
handler(event)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\chaco\tools\range_selection_2d.py", line 182, in normal_right_down
mapped_pos = self._map_data([(x_pos,y_pos)])[0][self.axis_index]
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\chaco\tools\range_selection_2d.py", line 282, in _map_data
return self.mapper.map_data(screen_pts)
File "C:\Users\rporuri\.edm\envs\chaco-test-3.6-pyqt5\lib\site-packages\chaco\linear_mapper.py", line 65, in map_data
return (screen_val - self.low_pos) / self._scale + self.range.low
TypeError: unsupported operand type(s) for -: 'list' and 'float'
Problem Description
I am trying to add the functionality to set ROI with a mouse using
RangeSelection2D
.However, I am getting the following error after right-clicking the image displayed.
I see some old attempt here.
Reproduction Steps:
Run the following code with an image file and then right-click the image in the interface.
Expected behavior:
[Describe expected behavior here]
OS, Python version:
macOS, Python 3.6.12
The text was updated successfully, but these errors were encountered: