Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError thrown on specific byte sequence #5

Open
adamsqi opened this issue Dec 12, 2022 · 1 comment
Open

ValueError thrown on specific byte sequence #5

adamsqi opened this issue Dec 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@adamsqi
Copy link

adamsqi commented Dec 12, 2022

ValueError is thrown in optimal_sequence_to_bits when generating Aztec codes. In MIXED mode there is no coding of the 2-byte sequence b'\r\n'. Below is the thrown error.

File "/usr/local/lib/python3.10/site-packages/aztec_code_generator.py", line 514, in find_suitable_matrix_size
    out_bits = optimal_sequence_to_bits(optimal_sequence)
  File "/usr/local/lib/python3.10/site-packages/aztec_code_generator.py", line 403, in optimal_sequence_to_bits
    index = code_chars[mode].index(ch)
ValueError: b'\r\n' is not in list

@dlenski I've tried to fix this problem myself, but my knowledge of the Aztec algorithm isn't good enough for that.

@jschlyter
Copy link

I'm in the same team as @adamsqi and we're suffering a bit from this. Is there anything we can do to move forward @dlenski (except trying to fix find_optimal_sequence that is).

@dlenski dlenski added the bug Something isn't working label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants