Open codingS3b opened 7 years ago
Having the same setup, don't have the problem in the older Firefox ESR 52.3.0 (64-bit) on Debian 9.1 (stretch)
Tried again with chromium 60.0.3112.78 running on Ubuntu.16.04 and it seems to be working correctly there as well.
I downloaded a Firefox 55.0.1 (64bit) for Linux and also can't reproduce it there. Any Firefox Extensions/Plugins you have installed?
apologies for the delay looking at this @codingS3b. So far, this seems to be working ok for me in Chrome 59.0.3071.115 (Official Build) (64-bit)
and FF 55.0.2 (64-bit)
on Ubuntu 16.0.4...
Also, what's your jupyter notebook --version
?
Concerning plugins I use Adblock Plus but disabled it for testing and the google analytics deactivation add-on but that's it. My jupyer notebook version is 5.0.0. I also tried this again using Chromium 60.0.3112.78 on Ubuntu 16.04 and got the same behaviour as with firefox.
I have to add that the widgets are rendered correctly sometimes I refresh the notebook using F5 but sometimes not. Strange thing...
I have the same problem as codingS3b .. widgets appear twice when executed by an initialization cell
I'm still unable to reproduce this. Combined with the intermittent observations, this leads me to suspect a timing issue, maybe some race condition somewhere. @BarbaraPr what versions of everything are you running?
Are all of you running the server on the same machine as the browser, or is the notebook server running on a remote machine?
I have now tried both versions with firefox and chromium, here are my experiences:
Chromium:
Firefox:
Would a screenshot from the browser debugging section help you in some way?
Thanks @codingS3b, so from that it seems like maybe this issue is more likely to trigger when the notebook is loaded quickly (I asked about local/remote servers because in the past I've found that the extra time required to get the notebook from the remote server can affect timing-related bugs).
Would a screenshot from the browser debugging section help you in some way?
I'm not sure, really :laughing: I'm still at a loss for what could cause this. However, I suspect this has more to do with how widgets are implemented (somehow the cell clearing its outputs on execution is not happening correctly?!) than with init_cell, which after all just queues the cells for regular execution :thinking:
I had same issue when running notebook on ec2 GPU instance. I had same notebook running on localhost too and synced through dropbox. so I shutdown the notebook on remote ec2 instance. Then I shut down same notebook on localhost. Then restarted it on ec2 only, and it worked.
Same issue on VSCode Jupyter Notebook.
In jupyter notebook if your display()
call is the last line of the cell jupyter will automatically print its returning value. So its displaying one time because of the call of the display function and a second time because the Output
widget is returned by the display()
function and is then being printed by jupyter. Adding an empty print()
statement at the end fixed it for me.
When creating an input cell on a jupyter notebook that displays an ipywidget and marking this cell as Initialization cell, the widget is rendered twice on my machine.
See the following example:
However it seems to work correctly when no widgets are involved:
Maybe @jcb91 could have a look at this?
Tested with