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

Matplotlib 3.3 Compatibility #38

Open
borupdaniel opened this issue Aug 4, 2020 · 0 comments
Open

Matplotlib 3.3 Compatibility #38

borupdaniel opened this issue Aug 4, 2020 · 0 comments
Labels

Comments

@borupdaniel
Copy link
Member

The latest version of Matplotlib-base breaks GPI. The error message gives some likely culprits, either _init_toolbar or use of the basedir attribute (both should be addressed here even if only one is causing the error). Here's the output from a crash on Windows, however, this is failing on all platforms per the latest build.

Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py:88: MatplotlibDeprecationWarning:
The _init_toolbar method was deprecated in Matplotlib 3.3 and will be removed two minor releases later. Please fully initialize the toolbar in your subclass' __init__; a fully empty _init_toolbar implementation may be kept for compatibility with earlier versions of Matplotlib.
  super().__init__(canvas, parent)
Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py:91: MatplotlibDeprecationWarning:
The basedir attribute was deprecated in Matplotlib 3.3 and will be removed two minor releases later. Use os.path.join(mpl.get_data_path(), 'images') instead.
  self.basedir = os.path.join(matplotlib.rcParams[ 'datapath' ],'images')
Tue Aug  4 10:17:36 2020 - gpi.nodeAPI:113 - ERROR - initUI() failed. Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py
Traceback (most recent call last):
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi\nodeAPI.py", line 111, in __init__
    self._initUI_ret = self.initUI()
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py", line 1002, in initUI
    self.addWidget('MatplotDisplay', 'Plot')
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi\nodeAPI.py", line 621, in addWidget
    wdgGroup = wdgGroup(title)
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py", line 558, in __init__
    self._plotwindow = self.create_main_frame()
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py", line 737, in create_main_frame
    self.mpl_toolbar = NavbarTools(self.canvas, self)
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py", line 88, in __init__
    super().__init__(canvas, parent)
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\matplotlib\backends\backend_qt5.py", line 687, in __init__
    NavigationToolbar2.__init__(self, canvas)
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\matplotlib\backend_bases.py", line 2853, in __init__
    init()
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\gpi_core\display\GPI/Matplotlib_GPI.py", line 91, in _init_toolbar
    self.basedir = os.path.join(matplotlib.rcParams[ 'datapath' ],'images')
  File "Miniconda3\envs\gpi_mpl33\lib\site-packages\matplotlib\cbook\deprecation.py", line 203, in __set__
    return super().__set__(instance, value)
AttributeError: can't set attribute
@borupdaniel borupdaniel added the bug label Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant