Skip to content

TypeError when running stock prices examples #719

@rahulporuri

Description

@rahulporuri

This error was discovered when running the examples/demo/financial/stock_prices.py example.

In order to reproduce, simply load the example and start zooming out. This was observed on python 3.6 with wx toolkit.

>python stock_prices.py
c:\users\rporuri\work\github\ets\enable\kiva\agg\plat_support.py:188: wxPyDeprecationWarning: Call to deprecated item. Use GetHandle instead.
  self.draw(window_dc.GetHDC(), x, y, width, height)
Exception occurred in traits notification handler for event object: TraitChangeEvent(object=<chaco.data_range_1d.DataRange1D object at 0x000001C06339C518>, name='updated', old=<undefined>, new=(1614674109.0105073, 1657874109.0105073))
Traceback (most recent call last):
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\traits\observation\_trait_event_notifier.py", line 122, in __call__
    self.dispatcher(handler, event)
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\traits\observation\observe.py", line 26, in dispatch_same
    handler(event)
  File "stock_prices.py", line 147, in _plot_range_handler
    low, high = event
TypeError: 'TraitChangeEvent' object is not iterable
Exception occurred in traits notification handler for event object: TraitChangeEvent(object=<chaco.data_range_1d.DataRange1D object at 0x000001C06339C518>, name='updated', old=<undefined>, new=(1593074109.0105073, 1679474109.0105073))
Traceback (most recent call last):
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\traits\observation\_trait_event_notifier.py", line 122, in __call__
    self.dispatcher(handler, event)
  File "C:\Users\rporuri\.edm\envs\enable-test-3.6-wx\lib\site-packages\traits\observation\observe.py", line 26, in dispatch_same
    handler(event)
  File "stock_prices.py", line 147, in _plot_range_handler
    low, high = event
TypeError: 'TraitChangeEvent' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions