question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Widget state not being saved correctly

See original GitHub issue

Hi there,

I am working on using ipycanvas for a data annotation widget. Typically, I document my widget packages by:

  • writing a jupyter notebook with the widgets in
  • executing them manually (once)
  • saving them using the jupyter notebook Widgets > Save widget state functionality
  • include them in my sphinx documentation using nbsphinx

This works well for some widgets (e.g. here, where the buttons are still interactive).

However, when I try and do this with ipycanvas widgets (I am nesting a MultiCanvas inside a VBox), the widgets are not displayed properly.

Is there an issue there that I’m missing? Do I need to do anything “special” to include ipycanvas widgets? Or is it an ipycanvas bug?

Thanks very much, Jan

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
martinRenoucommented, Jan 18, 2020

This is now fixed in 0.4.2! Please give it a try 😃

It is available with pip, not yet with conda. You need to set sync_image_data to True on your canvas for it to work.

1reaction
janfreybergcommented, Jan 16, 2020

Thanks - yes, I tried using sync_image_data and like you say this doesn’t solve the issue. And really, the static image is all I would want - it’s mainly so I can (programatically) show what a canvas onto which I’ve drawn a few things would look like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML ipywidgets state is not saved with the notebook
1 Answer 1 ... There should be a menu entry in the "Widgets" menu to "Save notebook widget state". This is disabled by...
Read more >
Managing the state of a Widget using bloc | Flutter - FlutterDevs
Suppose we have this Widget tree and we need to update only on development in the Widget tree but if we use setState(),...
Read more >
JSDoc: Widget: interactiveGrid - Oracle Help Center
If the save was successful then the status property equals "success". selectionchange. Triggered when the selection state changes and will work ...
Read more >
Creating forms from models - Django documentation
When you use a save() on a form, all data – including many-to-many data – is saved without the need for any additional...
Read more >
Custom Widgets - FlutterFlow Docs
Make sure your pub.dev widget has Null Safety support. This is required to use the Custom Widget in FlutterFlow.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found