-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
[Bug]: Figure manager is gone - AttributeError: 'NoneType' object has no attribute 'canvas' #23648
Comments
Can you reproduce this without pandas? |
Even with pandas I cannot reproduce this locally. But a few things did change with the backend fallbacks, so its not impossible the CI is not falling back gracefully? |
@1kastner can you get the package lists from the last working and first broken run? |
My last working build on readthedocs used the following packages installed via pip: First, the default packages of readthedocs:
...and then the packages I need to build the docs:
That was one day and two hours ago. The first build afterwards happend 7 hours ago and failed with these versions:
...and in the second step
In both cases, Python 3.10.4 was used and when we compare the output, also the matplotlib version was obviously the same. However, there was an update from I know that the project comes with some complexity and that there are a few libraries around that most likely have nothing to do with this error. I will try to work on a minimal example if nothing jumps to our minds here. I checked the commit between the last successful and first failing build. It only contains some changes in the unittests, no change in dependencies. As both the CI on GitHub and readthedocs are failing, it is rather unlikely that this bug is due to a miraculous specific change on their server side. |
...and tada, at https://github.com/ipython/matplotlib-inline/blob/master/matplotlib_inline/backend_inline.py#L55 we have a return statement that potentially makes the figure manager |
For now pinning that back will get your tests running again, but someone needs to sort out what the right fix here is. I was a bit through because you reported using the agg backend in the original post. I am 95% sure that we need to fix this on the matplotib-inline side. |
Thank you for tracking this down @1kastner ! |
@tacaswell I did not understand matplotlib well enough to tell you that the other backend was effectively used. I am sorry for the confusion I introduced! |
In general adding |
We can close this from our end, right? |
I am only 95% sure it is a bug on their side. It is possible than returning |
I have created a new ticket at their repository and fixed the version in my project for the meantime. With the previous version set, everything works again. I will keep you updated. For me, both options (closing the ticket or waiting for the final answer before doing that) are okay. |
And of course thank you very much for the very fast support! |
Well lets close here and re-open if ipython/matplotlib-inline#18 bounces back to us. Stuff never gets closed otherwise.... |
The error was spotted and a new release drafted. Generally speaking, a more detailled error message that also included the currently used backend would have been awesome and it would have saved me from coming here in the first place. But I also see that this is not easy to achieve as matplotlib and its respective backend are deeply integrated. |
Bug summary
The figure manager is None even though everything should work nicely.
Code for reproduction
A simple example of pandas should suffice:
Actual outcome
Out of the sudden, my server CI fails with the following traceback:
The first invocation is just some default invocation of pandas. Thus, I am very confident that this has nothing to do with my code. Just a few days back, the CI was working wonderfully. It is still working wonderfully locally on my computer.
Expected outcome
The figures should be displayed just like before.
Additional information
See https://github.com/1kastner/conflowgen/runs/7882122350?check_suite_focus=true for the original traceback.
It has worked before.
I have no idea why this is happening now. I was even tampering with the matplotlib backend (setting one explicitely via an env variable) but it did not have any effect on this error.
Operating system
Linux
Matplotlib Version
3.5.3
Matplotlib Backend
agg
Python version
3.10.6
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: