Skip to content

Integer overflow when attempting to use on any CNF file #4

@Lilian-Parey

Description

@Lilian-Parey

Greetings, using python 3.11.4, this message appears:

F:\TPM1\c2\tp gamma\CNF>python read_cnf.py eu.CNF

Traceback (most recent call last):
  File "F:\TPM1\c2\tp gamma\CNF\read_cnf.py", line 444, in <module>
    c = read_cnf_file(filename, 'TRUE')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\TPM1\c2\tp gamma\CNF\read_cnf.py", line 135, in read_cnf_file
    read_dic.update(get_channel_data(f, offs_param, offs_chan))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\TPM1\c2\tp gamma\CNF\read_cnf.py", line 299, in get_channel_data
    n_channels = uint8_at(f, offs_param + 0x00ba) * 256
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
OverflowError: Python integer 256 out of bounds for uint8

Beside my own errors I reckon this could either be caused by changes in the file format in the genie 2000 version I had access to or due to a python version more recent than the one this project was developed in
Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions