-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
notebook backend figures close spontaneously #6075
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
Comments
@fperez That definitely sound like a bug but not something I have not seen that happening. I have seen the interaction break with figures after long time in the sense that the browser still thinks they are interactive but the interaction does not work. However that only happens after suspending the computer and so on and does not convert the figure to a static image. Could this be browser related? I have mainly used the notebook backend in Chrome. (It should of cause run in all the same browsers as Jupyter does) Are there any messages in the browser console? or in the Jupyter log. It is normal to see warnings such as
due to a bug in our closing of the comm object in the notebook backend when closing a figure. |
@fperez - is your browser being refreshed? Currently the interactive figure is baked into a static png once the page is reloaded, and could conceivably be the issue... |
@pelson's theory sounds plausible to me as well... I've never seen this happen personally... |
Nope, no refresh at all: this was on Chrome, and it happens in a few minutes, just by going to another window/desktop and coming back shortly thereafter. No errors logged at the console, nothing... |
Did some more testing, had it happen in under 10 seconds while I was typing in the notebook itself. No tab switching, nothing... I added calls to I just tried with Firefox, and I'm not seeing it happen at all... I'll leave it running for a while to see if it eventually happens, but after a few minutes, nothing (when Chrome does it pretty quickly). BTW, several times it occurred, I saw nothing on the JS console in Chrome. But on the last occurrence, I did get this (screenshot b/c copy/pasting messes formatting horribly): Hope it helps... |
OK, I've now reproduced it also on Firefox (still on OSX, same versions of the rest). This time it took ~ 1 minute to happen, and I was watching the browser when it happened. It simply closed the figure and left the static png in place without any input from me, just as if I'd clicked the "close" button. Nothing on the JS console. |
What versions of Jupyter packages are you running? Are you able to reproduce on older versions (assuming dev)? |
I'm running this off the master of the notebook. I'll set up an isolated conda env later with official/older versions, but not today, I'm afraid (swamped with deadlines). Thanks a lot for looking into this! If it's a bug on our side, we'll track it down :) |
@blink1073: Do you have any thoughts? |
I'm also using master of the notebook, matplotlib master and then matplotlib 1.51, Chrome on OSX 10.11, and I could not reproduce. I'm not sure what could be causing it, either... |
Reproduced on matplotlib 1.5.1, Chrome, Ubuntu 15.10 |
ping @jdfreder... |
This reproduce on my environment (Chrome, Windows10) too.
|
I have this problem too and can force it to happen simply by saving the notebook, meaning, at the moment I click on Save, the nbagg plot backend closes (without any error in the terminal of the notebook server). I have the same exact behaviour on all of my OSX 10.10.5 browsers:
I started noticing it a while ago, right now I went back up to MPL 1.4.3 (the earliest |
Looks like a notebook issue: I downgraded to notebook 4.1 and there I can not force the notebook backend plot to close simply by saving the notebook. My above tests were performed with notebook 4.2 (both versions as delivered by conda). import matplotlib as mpl
mpl.__version__
%matplotlib nbagg
import matplotlib.pyplot as plt
import numpy as np
plt.plot(np.sin(np.linspace(0,2*np.pi, 100))) |
This will also (hopefully) be fixed by the nbagg overhaul which is currently on master. |
Closing as this is pretty stale and I haven't seen this problem in ages. Thx all! |
Conda.
that demonstrates the issue i.e a small piece of code which reproduces the issue
and can be run with out any other (or as few as possible) external dependencies.
No
note where it used to work.
Not sure, hadn't noticed.
Issue specifics
If I create any figure with the notebook backend, and I switch away from the open notebook to some other work, invariably after returning to the open notebook a few minutes later I find my interactive figure closed (replaced by the static png render).
Is this intended behavior, is there a timeout somewhere that can be used controlled, or is it a bug?
Thanks!
The text was updated successfully, but these errors were encountered: