[chirp_devel] vx-8 banks index out of range error
I'm getting an error when trying to look at banks on a VX-8DR.
From what I can tell I don't think it's related to #409 or #415 because the banks weren't setup in chirp. The error occurs after reading from the radio and then clicking the banks tab.
This was with the latest (0.3.0dev) pulled from hg today.
Is anyone currently working on this or should I try to do some digging?
I know there was some recent traffic about VX-8 patches for memory and/or banks valid bits.
Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner self.run() File "/home/rct/proj/wouxun/chirp.hg/chirpui/common.py", line 231, in run job.execute(self.radio) File "/home/rct/proj/wouxun/chirp.hg/chirpui/bankedit.py", line 124, in execute banks = self.__bm.get_memory_banks(mem) File "/home/rct/proj/wouxun/chirp.hg/chirp/vx8.py", line 267, in get_memory_banks [x.number for x in self.get_bank_memories(bank)]: File "/home/rct/proj/wouxun/chirp.hg/chirp/vx8.py", line 259, in get_bank_memories memories.append(self._radio.get_memory(int(channel)+1)) File "/home/rct/proj/wouxun/chirp.hg/chirp/vx8.py", line 321, in get_memory flag = self._memobj.flag[number-1] File "/home/rct/proj/wouxun/chirp.hg/chirp/bitwise.py", line 184, in __getitem__ return self.__items[index] IndexError: list index out of range
Hi,
Banks are implemented as 24 arrays of 100 channel numbers. Channel numbers are used as indexes into the channel memories arrays. From the output it appears that one or more of the channel numbers is outside of the bounds 000 - 900.
Since channels 900-999 are actually skip channels, 999 is probably the EAI channel and 1000-1100 are the band scan channels it is conceivable that one or more banks contain legit channels outside of the expected range. Have you added skip channels to a bank, for example?
The patches I've submitted do not seem to touch the code that has the problem here. I've checked with a fresh copy from Hg right now and it works for my images. If you want to share an image that is triggering this I'm happy to characterise the problem more exactly.
I've also been meaning to look into why generating the bank page takes 48 seconds on my CPU. Seems like it's doing something a bit poorly.
On Mon, Mar 11, 2013 at 7:59 AM, Robert Terzi rct@r-t.org wrote:
I'm getting an error when trying to look at banks on a VX-8DR.
From what I can tell I don't think it's related to #409 or #415 because the banks weren't setup in chirp. The error occurs after reading from the radio and then clicking the banks tab.
This was with the latest (0.3.0dev) pulled from hg today.
Is anyone currently working on this or should I try to do some digging?
I know there was some recent traffic about VX-8 patches for memory and/or banks valid bits.
Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner self.run() File "/home/rct/proj/wouxun/chirp.hg/chirpui/common.py", line 231, in run job.execute(self.radio) File "/home/rct/proj/wouxun/chirp.hg/chirpui/bankedit.py", line 124, in execute banks = self.__bm.get_memory_banks(mem) File "/home/rct/proj/wouxun/chirp.hg/chirp/vx8.py", line 267, in get_memory_banks [x.number for x in self.get_bank_memories(bank)]: File "/home/rct/proj/wouxun/chirp.hg/chirp/vx8.py", line 259, in get_bank_memories memories.append(self._radio.get_memory(int(channel)+1)) File "/home/rct/proj/wouxun/chirp.hg/chirp/vx8.py", line 321, in get_memory flag = self._memobj.flag[number-1] File "/home/rct/proj/wouxun/chirp.hg/chirp/bitwise.py", line 184, in __getitem__ return self.__items[index] IndexError: list index out of range _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
On 3/10/2013 6:07 PM, Sean Burford wrote:
From the output it appears that one or more of the channel numbers is outside of the bounds 000 - 900.
That's correct. I dug into it a bit. The bank that is causing the problem has a couple of Marine VHF channels stored in it. I had forgotten that I had set that up. Banks can store channels from the pre-programmed memories.
The first one it is hitting which triggers the error is VHF Channel 9 which has an index of 0x2808. Marine VHF 16 is 0x280f.
I've also been meaning to look into why generating the bank page takes 48 seconds on my CPU. Seems like it's doing something a bit poorly.
The problem is easy to spot with the debugging print I put in for above. For each channel, it is getting/setting up the whole bank structure, in order to find out what banks it is in. If you've got 900 memories and 24 banks, get_bank_memories will get called 21,600 times.
The problem is easy to spot with the debugging print I put in for above. For each channel, it is getting/setting up the whole bank structure, in order to find out what banks it is in. If you've got 900 memories and 24 banks, get_bank_memories will get called 21,600 times.
Yeah, I did this for the ftxxxx radios and noted that it probably needed to be done for the others:
http://chirp.danplanet.com/projects/chirp/repository/revisions/980e756a4270
participants (3)
-
Dan Smith
-
Robert Terzi
-
Sean Burford