Skip to content

ValueError thrown on specific byte sequence #5

@adamsqi

Description

@adamsqi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions