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
When running chaco/chaco/examples/demo/advanced/scalar_image_function_inspector.py, a ValueError: object of too small depth for desired array will be raised
(py311) (base) cyliu@aus552cyliu chaco % python3.11 chaco/examples/demo/advanced/scalar_image_function_inspector.py
The function name tanh(x**2+y)*cos(y)*jn(0,x+y*2) is invalid
2023-05-08 11:20:17.147 Python[2607:50100] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/2z/kylzj9s92y71cxscmljmpqrh0000gt/T/org.python.python.savedState
Exception occurred in traits notification handler for object: <__main__.DemoModelView object at 0x12a12f7e0>, trait: edit_model, old value: <undefined>, new value: 0
Traceback (most recent call last):
File "/Users/cyliu/.venvs/py311/lib/python3.11/site-packages/traits/trait_notifiers.py", line 342, in __call__
self.handler(*args)
File "/Users/cyliu/Documents/3.11_test/chaco/chaco/examples/demo/advanced/scalar_image_function_inspector.py", line 601, in _edit_model_fired
self.model.configure_traits()
File "/Users/cyliu/.venvs/py311/lib/python3.11/site-packages/traits/has_traits.py", line 2164, in configure_traits
rc = toolkit().view_application(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 237, in view_application
return view_application.view_application(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/view_application.py", line 90, in view_application
app = QtGui.QApplication.instance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
[Previous line repeated 3 more times]
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 268, in leaveEvent
self.handler.leaveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 146, in leaveEvent
self._enable_window._handle_mouse_event("mouse_leave", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 470, in _create_mouse_event
pos = self.control.mapFromGlobal(QtGui.QCursor.pos())
^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 280, in mouseReleaseEvent
self.handler.mouseReleaseEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 164, in mouseReleaseEvent
name = BUTTON_NAME_MAP[event.button()]
^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 277, in mousePressEvent
self.handler.mousePressEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 159, in mousePressEvent
name = BUTTON_NAME_MAP[event.button()]
^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 274, in mouseMoveEvent
self.handler.mouseMoveEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 155, in mouseMoveEvent
self._enable_window._handle_mouse_event("mouse_move", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 265, in enterEvent
self.handler.enterEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 142, in enterEvent
self._enable_window._handle_mouse_event("mouse_enter", event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 349, in _handle_mouse_event
mouse_event = self._create_mouse_event(event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 460, in _create_mouse_event
x = event.position().x()
^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 253, in paintEvent
self.handler.paintEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 88, in paintEvent
self._enable_window._paint(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 524, in _paint
size = self._get_control_size()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 592, in _get_control_size
return (int(self.control.width() * self.base_pixel_scale),
^^^^^^^^^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
File "/Users/cyliu/Documents/3.11_test/traitsui/traitsui/qt/toolkit.py", line 129, in eventFilter
if event.type() == QtCore.QEvent.Type.KeyPress:
^^^^^^^^^^^^
[Previous line repeated 4 more times]
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 253, in paintEvent
self.handler.paintEvent(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/qt/base_window.py", line 88, in paintEvent
self._enable_window._paint(event)
File "/Users/cyliu/Documents/3.11_test/enable/enable/abstract_window.py", line 536, in _paint
self.component.draw(gc, view_bounds=(0, 0, size[0], size[1]))
File "/Users/cyliu/Documents/3.11_test/enable/enable/component.py", line 410, in draw
self._draw(gc, view_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/enable/enable/component.py", line 787, in _draw
self._dispatch_draw(layer, gc, view_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/enable/enable/container.py", line 270, in _dispatch_draw
component._dispatch_draw(layer, gc, new_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/enable/enable/container.py", line 268, in _dispatch_draw
component._draw(gc, new_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/enable/enable/component.py", line 777, in _draw
self._dispatch_draw(layer, bb, view_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/enable/enable/container.py", line 270, in _dispatch_draw
component._dispatch_draw(layer, gc, new_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/enable/enable/component.py", line 805, in _dispatch_draw
handler(gc, view_bounds, mode)
File "/Users/cyliu/Documents/3.11_test/chaco/chaco/base_2d_plot.py", line 221, in _draw_image
self._render(gc)
File "/Users/cyliu/Documents/3.11_test/chaco/chaco/plots/contour/contour_poly_plot.py", line 55, in _render
self._update_polys()
File "/Users/cyliu/Documents/3.11_test/chaco/chaco/plots/contour/contour_poly_plot.py", line 95, in _update_polys
c = Cntr(xg, yg, data, ~mask)
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: object of too small depth for desired array
Problem Description
When running chaco/chaco/examples/demo/advanced/scalar_image_function_inspector.py, a ValueError: object of too small depth for desired array will be raised
Reproduction Steps:
Link: https://github.com/enthought/chaco/blob/main/chaco/examples/demo/advanced/scalar_image_function_inspector.py
Full Stacktrace:
OS, Python version: [MacOS, python3.11]
The text was updated successfully, but these errors were encountered: