Project

General

Profile

Actions

Bug #11717

closed

After introduction of banks in UV17Pro driver, UV17 driver reports multiple errors for banks

Added by Pavel Moravec 25 days ago. Updated 25 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/28/2024
Due date:
% Done:

100%

Estimated time:
Chirp Version:
next
Model affected:
UV17 (and probably inherited drivers)
Platform:
Linux
I read the instructions above:
Yes

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.

Actions #1

Updated by Dan Smith 25 days 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!

Actions #2

Updated by Anonymous 25 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF