Bug #11717
closedAfter introduction of banks in UV17Pro driver, UV17 driver reports multiple errors for banks
100%
Description
When download finishes or file is loaded, and Banks tab is selected in GUI, several (9) error dialog boxes are displayed, maybe for banks 2-N. Can be tested on stock Baofeng_UV-17.img in tests/images directory
ERROR: <function ChirpBankEdit._refresh_memory at 0x7b7ae3fcc8b0> raised unexpected exception
Traceback (most recent call last):
File ".local/lib/python3.10/site-packages/chirp/wxui/common.py", line 642, in run_safe
return fn(*args, **kwargs)
File ".local/lib/python3.10/site-packages/chirp/wxui/bankedit.py", line 276, in _refresh_memory
for bank in self._bankmodel.get_memory_mappings(mem)]
File ".local/lib/python3.10/site-packages/chirp/chirp_common.py", line 794, in get_memory_mappings
return [self._banks[(memory.number - lo) // count]]
IndexError: list index out of range
As was suggested elsewhere, as this radio does probably not have banks, a workaround can be applied to use has_bank = False
which I will do later today, but this is just a mitigation, the bug is probably caused by something else in the bank code.
Updated by Dan Smith 3 months ago
Yep, this was an oversight when I added this to the base class. It looks to me like the UV17s don't have banks like the UV17Pros, so has_bank=False
is a good fix. But also please add:
def get_mapping_models(self):
return []
To fully future-proof it back to the way the base chirp_common.Radio
works.
Also, I'm happy to fix this myself if you want, but if you'd prefer to have it in your patch stack, that's fine and thanks!
Updated by Anonymous 3 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset github|d1f8504e9209601f5c75c2c082ed8c7a96777b1b.
Updated by Dan Smith 2 months ago
- Related to Bug #11739: Radioddity GA-510 added