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
Animation was deleted without rendering anything #21007
Comments
That is coming from matplotlib/lib/matplotlib/animation.py Lines 887 to 895 in 8ce14fb
matplotlib/lib/matplotlib/animation.py Lines 1129 to 1132 in 8ce14fb
That check should be running when the object is garbage collected which if there are circular references can be deferred some amount of time (until Python decides to do a sweep for circular references). As an implementation detail of CPython, If the reference count of an object goes to 0, it is immediately dealocated, however it is is possible to have 2 objects form a ring: A hold a reference to B and B hold a reference to A (the rings can be bigger). When you lose all reference to A and B in your code you can never get them back, however due to the circular references, the refcount is still >0 so Python does not know it is safe to get rid of them. Every so often the interpreter will do the (expensive) task of finding and breaking those loops. It defines "time" via number of byte codes processed, hence this will come out some random (but bounded) time later. |
Bun |
If this is in a notebook cell, there is also still a hard ref to Throwing a I suspect that the cell is being run and/or interrupted more than once? Also a bit worried that this is specific to either spyder or inline (but nothing is coming to mind as a reason why). |
I ran it as a cell several times, printed |
Irregular warning, sometimes prints sometimes not without changing anything in code. Didn't occur in
3.3.4
. It's also thrown after running an entirely different cell or file, if not restarting kernel first.conda install --conda-forge matplotlib 3.4.3
, backendmodule://ipykernel.pylab.backend_inline
(Spyder), Windows 10, Python 3.7.9The text was updated successfully, but these errors were encountered: