muccc / iridium-toolkit

A set of tools to parse Iridium frames
477 stars 111 forks source link

IndexError: string index out of range #104

Closed Guillaume-JEAN closed 1 year ago

Guillaume-JEAN commented 1 year ago

Hi ! i am using gr-iridium and iridium-toolkit for long acquisition (i have made a script that run gr-iridium, save the output, read it and parse it using iridium-parser.py) and sometimes i get this error, which stop the acquisition :

Traceback (most recent call last): File " .../gnuradio/gr-iridium/iridium-toolkit/iridium-parser.py", line 1606, in do_input(input) File "…/gnuradio/gr-iridium/iridium-toolkit/iridium-parser.py", line 1520, in do_input perline(Message(line.strip()).upgrade()) File "… /gnuradio/gr-iridium/iridium-toolkit/iridium-parser.py", line 247, in upgrade access.append(map[int(self.bitstream_raw[x+0])*2 + int(self.bitstream_raw[x+1])]) IndexError: string index out of range

this error may appear after 10 min as well as after an hour or not at all. Do you know what might cause this ? and is there a way to prevent it ?

Thank in advance for your response and for this great toolkit !

Sec42 commented 1 year ago

Hi,

based on the error message you pasted, you are using a iridium-parser version that is at least 1.5 years old. This code line itself does not exist anymore. Can you try with a more current version? (master from git should work fine)

Guillaume-JEAN commented 1 year ago

It took me longer than expected to update everything, but this seems to have solved the problem!

Thank you very much

Sec42 commented 1 year ago

Great to hear. Have fun!