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.8.0 breaks pyqso when cartopy is installed #78

Open
charims opened this issue Nov 22, 2023 · 3 comments · May be fixed by #80
Open

matplotlib >=3.8.0 breaks pyqso when cartopy is installed #78

charims opened this issue Nov 22, 2023 · 3 comments · May be fixed by #80

Comments

@charims
Copy link

charims commented Nov 22, 2023

pyqso was working fine until I installed cartopy to get the map to show. Then it failed to start. Running from the cli gives me:

$ pyqso
/usr/bin/pyqso:33: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
INFO:root:PyQSO version 1.1.0
INFO:root:Using version 1.26.1 of numpy.
INFO:root:Using version 3.8.1 of matplotlib.
INFO:root:Using version 0.22.0 of cartopy.
Traceback (most recent call last):
  File "/usr/bin/pyqso", line 174, in <module>
    application = PyQSO(args.logbook)  # Populate the main window and show it.
                  ^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/pyqso", line 95, in __init__
    self.toolbox = Toolbox(self)
                   ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pyqso/toolbox.py", line 41, in __init__
    self.world_map = WorldMap(self.application)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pyqso/world_map.py", line 163, in __init__
    toolbar = NavigationToolbar(self.canvas, self.application.window)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NavigationToolbar2GTK3.__init__() takes 2 positional arguments but 3 were given

Running archlinux with the install from the AUR. Looks like there was a change since matplotlib/matplotlib@0968f71#diff-b82974fdd131ae34e8637914da0f13f02f0ea4b5c57b7a8a5789a6faad7ebb5a

I tried dropping the window argument, then the application starts fine, but there's still no map.

@charims charims changed the title Latest matplotlib breaks when cartopy is installed matplotlib >=3.8.0 breaks pyqso when cartopy is installed Nov 22, 2023
@jaycrav3ns
Copy link

I have this happening as well. It ran straight from the unzipped folder. I installed the requirements and now:

INFO:root:PyQSO version 1.1.0
WARNING:root:Could not import the Hamlib module!
INFO:root:Using version 1.26.0 of numpy.
INFO:root:Using version 3.8.0 of matplotlib.
INFO:root:Using version 0.22.0 of cartopy.
WARNING:root:Could not import the Hamlib module!
Traceback (most recent call last):
  File "/home/jason/Downloads/pyqso-master/pyqso/pyqso.py", line 153, in <module>
    application = PyQSO(args.logbook)  # Populate the main window and show it.
                  ^^^^^^^^^^^^^^^^^^^
  File "/home/jason/Downloads/pyqso-master/pyqso/pyqso.py", line 74, in __init__
    self.toolbox = Toolbox(self)
                   ^^^^^^^^^^^^^
  File "/home/jason/Downloads/pyqso-master/pyqso/toolbox.py", line 24, in __init__
    self.world_map = WorldMap(self.application)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jason/Downloads/pyqso-master/pyqso/world_map.py", line 145, in __init__
    toolbar = NavigationToolbar(self.canvas, self.application.window)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NavigationToolbar2GTK3.__init__() takes 2 positional arguments but 3 were given

@Arzorth
Copy link

Arzorth commented Mar 24, 2024

same error here:

self.toolbar_2d = NavigationToolbar(self.canvas_2d, self.window_path)
TypeError: NavigationToolbar2GTK3.init() takes 2 positional arguments but 3 were given

@tomswartz07 tomswartz07 linked a pull request Nov 14, 2024 that will close this issue
@tomswartz07
Copy link

👋🏻 I made a PR (which will probably not be merged- it looks like this project is loong abandoned) which fixes this problem.

I'll probably continue to work on changes in my fork: https://github.com/tomswartz07/pyqso

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

Successfully merging a pull request may close this issue.

4 participants