Skip to content

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

@TheChymera

Description

@TheChymera

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions