Bug #8745

Icom IC-9x driver throws exception when a memory does not have a bank attribute

Added by Jonathan Woytek about 1 month ago.

Status:New Start date:01/27/2021
Priority:Normal Due date:
Assignee:- % Done:


Target version:chirp-daily
Chirp Version:daily Platform:MacOS
Model affected:IC-91AD


When reading channels from an IC-91AD, in ic9x.py line 142 (today's daily), the memory type was initialized as chirp_common.Memory(). This object does not have a _bank attribute. For reasons I don't fully parse yet, the last memory in both bank A and B would throw an exception when the program went to retrieve the _bank attribute. Wrapping the call to retrieve _bank on line 83 with a try/catch(AttributeError) so that it returns None when the _bank attribute is missing is one fix. While digging into that, I found the memory type initialization on line 142. Changing that initialization to use ic9x_ll.IC9xMemory eliminates the missing _bank attribute.

Not knowing which way might be the project's preferred way to handle this, I'm attaching my modified ic9x.py with both modifications.

Additionally, the IC-91AD band B has 450 memory locations, according to the documentation. The existing ic9x.py defined the maximum on band B as 400 channels. The band limits and other special channels get stored in these higher locations. I also updated the upper limit for band B to 449 to cover the 450 memory locations.

ic9x.py - patched ic9x.py (12.9 kB) Jonathan Woytek, 01/27/2021 05:33 pm

Also available in: Atom PDF