Issue
I tried to use observe for my toggleButton
wtarget = widgets.ToggleButtons(
description='select target',
options=['A', 'B', 'C', 'D', 'E', 'F'])
wtarget.observe(target_on_value_change, names='value')
It displayed this error:
AttributeError: 'ToggleButtons' object has no attribute 'observe'
I had no problem with another MacBook but this one showed the problem. I am using MacBook, 10.12. Python Version 4.0.0. ipywidgets was installed via pip.
Thanks.
Solution
This suggests that you have an old version of traitlets. .observe
was added in traitlets 4.1:
pip install --upgrade traitlets
You may want to upgrade more than that:
pip install --upgrade ipywidgets
Answered By - minrk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.