python-bchlib icon indicating copy to clipboard operation
python-bchlib copied to clipboard

"ValueError: invalid parameters" for some codes.

Open erezt2 opened this issue 7 months ago • 0 comments

I was able to reproduce this bug with many different codes, here is one example.

b = bchlib.BCH(2, m=5, swap_bits=True)
w = b'\x00\x00\xa0' # random word
d =  b'\xe0\x03' # the string you get from encoding
b.decode(data=w, recv_ecc=d)
^^^^^^^^
ValueError: invalid parameters

this also happens for swap_bits = False.

using python 3.10.8. version 2.1.3 of library.

For some codes, such as t=10,m=7 this doesn't happen

erezt2 avatar Jun 02 '25 18:06 erezt2