-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipywidgets "Error displaying widget" on example pages #226
Comments
After poking around a bit, I only see the issue so far happening on widgets that involve sliders. Other widgets seems to work completely fine. For example, see this: https://github.com/sandertyu/widgetstuffs/blob/ipywidgets-test/Thebe/ipywidgets.html When running this in the browser, I get an error with: "Error: Could not create a view for model id ". |
I was playing with some of the output widget documentation in both Thebe and JupyterLab and I came across this curious difference;
In JupyterLab, all the calls and modications done to the Output() widget You can see this more plainly for yourself using this HTML page. The |
I've added console messages to
I found that once the widget is initialized and after the first change to the widget (once the cell recognizes that the button has been moved one tick), the clear_output(wait = false) function is called but does not get called afterwards. From there, no visible changes are made to the output of the widget (shown as |
I believe that |
To add on to what @sandertyu explained, we investigated more and put more console logs in the output.js and got the results as displayed in the image below: As is shown in the image, the first time when a change happens and it works, |
Additionally, the first change to the slider which actually works goes through another file services-shim.js which is the comm API and handles the communication between the front-end and the kernel. As can be seen from the image, it first goes through the |
This is fixed by #418. |
On the example pages, such as the Activate/Status button example, ipywidgets displays an error;
However, when this same code is ran on https://minrk.github.io/thebelab/ , the widget works fine;
This may not be an issue per se, but I am curious why the widget works on one page but not on the other. I am part of a team which has created a ckeditor plugin for Libretexts.org to enable users to input live interactive code via ThebeLab. In our ckeditor plugin, the same ipywidgets code as above also gives an "Error displaying widgets" message. I would like to know how to remedy this error displaying issue, as it seems that there is a current fix for it.
Additionally, one of our users is trying to implement the widgets via the
interact()
function but the widgets are not displaying at all (user's full code and libretexts implementation available here). The Issues here are confusing and some hint that fixes have been made, but obviously it is not working for us. The console error messages are exactly the same as outlined in issue #72. There is mention of an output implementation in that issue, but no follow up. Any help diagnosing and debugging this output widget issue would be greatly appreciated.Edit: I've tried to run the widgets on both ThebeLab pages today, and they both appear to work. I'm not sure if something has changed behind the scenes and/or ThebeLab is inconsistent with ipywidgets.
Edit again: Not sure if I'm seeing things, but the ipywidgets are again no longer working on the example code pages. Very strange.
The text was updated successfully, but these errors were encountered: