Skip to content
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

AttributeError: 'FigureCanvasGTK3Agg' object has no attribute 'renderer' #7

Open
TheChymera opened this issue Sep 18, 2020 · 2 comments

Comments

@TheChymera
Copy link

I get the following error when trying to run niicat — any ideas what could be wrong?

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.7/niicat", line 50, in <module>
    main()
  File "/usr/lib/python-exec/python3.7/niicat", line 46, in main
    plot(args.nifti_file, dpi=args.dpi)
  File "/usr/lib/python3.7/site-packages/niicat/plotter.py", line 254, in plot
    return _plot_nifti_preview(iFile, return_fig=return_fig, dpi=dpi)
  File "/usr/lib/python3.7/site-packages/niicat/plotter.py", line 233, in _plot_nifti_preview
    _plot_sixel(fig)
  File "/usr/lib/python3.7/site-packages/niicat/plotter.py", line 36, in _plot_sixel
    res = _sixel_encode(fig.canvas.buffer_rgba(), fig.get_figwidth()* dpi, fig.get_figheight() * dpi)
  File "/usr/lib/python3.7/site-packages/matplotlib/backends/backend_agg.py", line 444, in buffer_rgba
    return self.renderer.buffer_rgba()
AttributeError: 'FigureCanvasGTK3Agg' object has no attribute 'renderer'

My matplotlib installation has gtk3 support enabled (though the error remains the same with it disabled):

[U] dev-python/matplotlib
     Available versions:  3.2.2-r2^t (~)3.3.0-r1^t (~)3.3.1-r2^t {cairo doc examples excel gtk3 latex qt5 test tk wxwidgets PYTHON_TARGETS="python3_6 python3_7 python3_8 python3_9"}
     Installed versions:  3.2.2-r2^t(03:19:33 PM 09/18/2020)(cairo gtk3 latex wxwidgets -doc -examples -excel -qt5 -test -tk PYTHON_TARGETS="python3_7 -python3_6 -python3_8 -python3_9")
     Homepage:            https://matplotlib.org/
     Description:         Pure python plotting library with matlab like syntax
@wasserth
Copy link
Collaborator

wasserth commented Oct 5, 2020

Unfortunately I can not reproduce this error. Therefore I am not sure what is going wrong.

@TheChymera
Copy link
Author

@wasserth thanks for the reply. Is there perhaps anything else I can do to provide a more informative traceback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants