-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
RuntimeError: Cannot get window extent w/o renderer #10874
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
The actual problem was noticed in https://bitbucket.org/zunzuncode/zunzunsite3. It manifests itself by the fact that no graphs are not rendered when running with matplotlib 2.2.2. The minimal code to reproduce the reported bug is the result of analyzing the zunzunsite3 code flow, removing all the unnecessary calls. |
bisects to #9452 (so I guess my fault, although what happened is unclear to me :/) |
I’m always confused about these fcns but I thought they all required a renderer. |
Yeah, I don't see how it could have anything to do with that PR
…On Sat, Mar 24, 2018 at 8:42 PM, Jody Klymak ***@***.***> wrote:
I’m always confused about these fcns but I thought they all required a
renderer.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10874 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-CCRePwvW-61LDe_fwubWUEf23c-ks5thuf7gaJpZM4S52fh>
.
|
See #10881 and the description of the issue.... |
Cross ref #5665 |
Is it solved yet? |
... as a work around until #11004 gets through (ping @efiring), or we ressurect #10881, you can explicitly supply the renderer and all works fine. The problem here is that the outermost ticks are never drawn, so their renderer is never set, so the fallback for for xtick in ax.get_xticklabels():
bb = xtick.get_window_extent(renderer=fig.canvas.get_renderer())
for ytick in ax.get_yticklabels():
ytick.get_window_extent(renderer=fig.canvas.get_renderer()) |
Sorry for reopening but in my case in offsetbox.py get_window_extend(self, renderer=None) the line Instead, as a workaround I tried I have at the moment no time to go into deeper details or to create a new case. Sorry for that. |
Bug report
Bug summary
Matplotlib 2.2.0 seems to introduce regression regarding the use of
Agg
renderer. In specific cases, get_window_extent() does raiseRuntimeError: Cannot get window extent w/o renderer
.Code for reproduction
Actual outcome
Expected outcome
No exception should be raised. No exception is raised when the code is used with matplotlib 2.1.2.
Matplotlib version
print(matplotlib.get_backend())
): aggInstalled with
pacman -S python python-matplotlib
. Tested against older version of matplotlib by installing them in virtualenv using pip.The text was updated successfully, but these errors were encountered: