OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
852 stars 309 forks source link

[Bug] GRASS GUI - Support for python 3.10 and WxPython 4.1.1 #2112

Closed epifanio closed 2 years ago

epifanio commented 2 years ago

Describe the bug

Installing grass on ubntu 22- default python version 3.10.1 wxpython installed via PIP, version: 4.1.1

Are those version of python+wx supported by the grass graphical user interface?

Building grass master I have no compilation errors, but attempting to run in GUI mode I get the main gui but most of the toolbars functionality are misplaced or not functioanl.

The logs in the Console shows the following errors:

Traceback (most recent call last):
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/scrolledpanel.py", line 172, in OnChildFocus

self.ScrollChildIntoView(child)
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/scrolledpanel.py", line 225, in
ScrollChildIntoView

self.Scroll(new_vs_x, new_vs_y)
TypeError
:
_ScrolledWindowBase.Scroll(): arguments did not match any
overloaded call:
  overload 1: argument 1 has unexpected type 'float'
  overload 2: argument 1 has unexpected type 'float'
Traceback (most recent call last):
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/agw/flatnotebook.py", line 5201, in OnPaint

renderer.DrawTabs(self, dc)
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/agw/flatnotebook.py", line 2356, in DrawTabs

self.DrawTab(pc, dc, posx, i, tabWidth, tabHeight,
pc._nTabXButtonStatus)
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/agw/flatnotebook.py", line 2655, in DrawTab

dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset,
imageYCoord)
TypeError
:
DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'
Traceback (most recent call last):
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/agw/flatnotebook.py", line 5201, in OnPaint

renderer.DrawTabs(self, dc)
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/agw/flatnotebook.py", line 2356, in DrawTabs

self.DrawTab(pc, dc, posx, i, tabWidth, tabHeight,
pc._nTabXButtonStatus)
  File "/home/epinux/.local/lib/python3.10/site-
packages/wx/lib/agw/flatnotebook.py", line 2655, in DrawTab

dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset,
imageYCoord)
TypeError
:
DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'

To Reproduce Steps to reproduce the behavior:

  1. build and run GRASS GIS from the master branch on a Linux distribution with default python version 3.10 - and WxPython installed via PIP(4.1.1)
  2. run grass in GUI mode
  3. interact with basic functionalities from the Layers panel
  4. See weird GUI behavior

Expected behavior The GUI doesn't create toolbars and the rendered tools are missing their functionalities

System description (please complete the following information):

petrasovaa commented 2 years ago

See e.g. #2040, unfortunately it's problem with wxPython on Python 3.10, you probably need to compile latest wxPython which contains fixes.