Bug #11686
closed'ChirpGridTable' object has no attribute 'GetRowsCount'
0%
Description
I have try to read a data from my Quansheng UV-K6 radio by an usb-serial cable with ch341-uart converter.
Menu -> Radio -> Read from radio: ttyUSB0, Quansheng, UV-K5
I've expected to see a table with data from the radio.
Nothing happends in the user interface but some traceback appeared in terminal:
Traceback (most recent call last):
File "/home/xbow/.local/pipx/venvs/chirp/lib/python3.10/site-packages/chirp/wxui/main.py", line 1583, in menu_download
editorset = ChirpEditorSet(radio, None, self._editors)
File "/home/xbow/.local/pipx/venvs/chirp/lib/python3.10/site-packages/chirp/wxui/main.py", line 201, in __init_
edit = self.MEMEDIT_CLS(radio, self.editors)
File "/home/xbow/.local/pipx/venvs/chirp/lib/python3.10/site-packages/chirp/wxui/memedit.py", line 737, in __init_
self.table = ChirpGridTable(self._features, len(self._col_defs))
File "/home/xbow/.local/pipx/venvs/chirp/lib/python3.10/site-packages/chirp/wxui/memedit.py", line 51, in __init_
self._rowmap = {x: x for x in range(0, self.GetRowsCount())}
AttributeError: 'ChirpGridTable' object has no attribute 'GetRowsCount'
wx version 4.1.1
python version 3.10.12
chirp version 20241115
distro Linux Mint 21.3
I cant found the GetRowsCount method in my version on wx.grid, only the GetNumberRows method:
$ python3
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import wx
import wx.grid
s = wx.grid.GridStringTable()
dir(s)
['AppendCols', 'AppendRows', 'Clear', 'CornerLabelValue', 'DeleteCols', 'DeleteRows', 'GetColLabelValue', 'GetCornerLabelValue', 'GetNumberCols', 'GetNumberRows', 'GetRowLabelValue', 'GetValue', 'InsertCols', 'InsertRows', 'NumberCols', 'NumberRows', 'SetColLabelValue', 'SetCornerLabelValue', 'SetRowLabelValue', 'SetValue', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref']
print(wx.version)
4.1.1
Files
Updated by Alex Savvin 5 days ago
- File config.txt config.txt added
- File linux_system_info.txt linux_system_info.txt added
- File debug_log.txt debug_log.txt added
[Uploaded from CHIRP py3dev]
Updated by Dan Smith 5 days ago
Where is your wxpython from? On ubuntu 22.04, I have 4.0.7 provided by the system packages and it works fine.
$ dpkg -l python3-wxgtk4.0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-===================-============-==================================================================
ii python3-wxgtk4.0 4.0.7+dfsg-13build1 amd64 Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit
and on 24.04, the available version is:
python3-wxgtk4.0/noble 4.2.1+dfsg-3build2 amd64
Have you installed wxpython from source or let pip build it?
Updated by Alex Savvin 5 days ago
It seems was installed by requirements.txt when i cloned chirp from github.com/kk7ds/chirps
wxPython>=4.0,<4.2.0 ; platform_system=="Linux" # See https://github.com/wxWidgets/Phoenix/issues/2225
wxPython==4.2.0 ; platform_system!="Linux"
pyserial
requests
pywin32; platform_system=="Windows"
suds
yattag
In the system wxgtk 4.0.7 installed:
╰─➤ dpkg -l | grep wxgtk 1 ↵
ii libwxgtk-webview3.0-gtk3-0v5:amd64 3.0.5.1+dfsg-4 amd64 wxWidgets Cross-platform C++ GUI toolkit (GTK 3 webview library runtime)
ii libwxgtk3.0-gtk3-0v5:amd64 3.0.5.1+dfsg-4 amd64 wxWidgets Cross-platform C++ GUI toolkit (GTK 3 runtime)
ii python3-wxgtk4.0 4.0.7+dfsg-13build1 amd64 Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit
╭─xbow@sun ~/git/chirp ‹master*›
╰─➤
but in ~/.local/lib/python3.10/site-package/wx:
╭─xbow@sun ~/.local/lib/python3.10/site-packages/wx
╰─➤ cat __version__.py
# This file was generated by wxPython's wscript.
VERSION_STRING = '4.1.1'
MAJOR_VERSION = 4
MINOR_VERSION = 1
RELEASE_NUMBER = 1
BUILD_TYPE = 'development'
VERSION = (MAJOR_VERSION, MINOR_VERSION, RELEASE_NUMBER, '')
Updated by Dan Smith 5 days ago
Yeah, so please follow ChirpOnLinux and install using --system-site-packages
so that you get wxpython from the system packages that matches your GTK library. The build-by-pip stuff is likely not very well matched to the GTK you've got on your system (and/or has built it own version of that too, not sure).
Updated by Alex Savvin 5 days ago
Done. When i moved out the directory .local/lib/python3.10/site-packages/wx the program works OK.