Closed johnowhitaker closed 6 months ago
(In case it isn't clear in the screenshot, I clicked the button 3 times)
Hi there, I'm not able to reproduce this in VS Code. If you can provide a minimal reproducible example (how you created the Python environment and exactly what you ran, that would be very helpful).
Trying in jupyter notebook v6 gives "Failed to load model class 'AnyModel' from module 'anywidget'" error.
This was a bug and I just now pushed a fix in #553. Please pip install anywidget==0.9.10
.
Correction: There is a bug in your code snippet.
The traitlet is named value
not count
. You need to update the example.
counter = CounterWidget()
-- counter.count = 42
++ counter.value = 42
counter
-- counter.count
++ counter.value
Gah sorry about that, figured it out and came to see you'd already beat me to it.
The counter example doesn't work as expected for me - the count increments when being clicked but accessing and setting counter.count shows an unrelated value and doesn't change the displayed count in the button.
This is in VSCode on windows. Trying in jupyter notebook v6 gives "Failed to load model class 'AnyModel' from module 'anywidget'" error.