OoT-Randomizer icon indicating copy to clipboard operation
OoT-Randomizer copied to clipboard

Improve settings string parse error message

Open domgetter opened this issue 10 months ago • 1 comments

When trying to run ./OoTRandomizer.py --settings_string BSAWDNCAX2TB2WCHGAB3L62ANEBBABATJCABAAAEAAEAAAAAABAXCAAABNAGJD8ASAJPUVLX9BSBNETL3CAEAAJQBESRLNAEARAAQGAEGWDGBEAJCENLZA , the following error is produced:

Traceback (most recent call last):
  File "./OoTRandomizer.py", line 64, in <module>
    start()
  File "./OoTRandomizer.py", line 17, in start
    settings, gui, args_loglevel, no_log_file, diff_rom = get_settings_from_command_line_args()
  File "/home/ubuntu_user/OoT-Randomizer/Settings.py", line 452, in get_settings_from_command_line_args
    settings.update_with_settings_string(args.settings_string)
  File "/home/ubuntu_user/OoT-Randomizer/Settings.py", line 229, in update_with_settings_string
    value.append(setting.choice_list[index-1])
IndexError: list index out of range

On Ubuntu 20.04 in WSL using Python 3.8.10 from b24bfec

When running ./OoTRandomizer.py --settings_string BSAWDNCAKTAAUXFCAJ2UWJAATCAAAAAACAAACAASHASAJGBBALAAAAAAAAAAASAC2FRAAEGEAHSQSAAAFUTNA it works just fine.

settings.save file only contains

{
    "rom": "ZOOT.n64",
}

domgetter avatar Feb 23 '25 15:02 domgetter

Settings strings are version-specific: that's the S8 settings string for version 8.2.0, the one for 8.2.57 is BSAWDNCAX2TB2WCHGAB3L62ANEBSAAAACAASAAAASK7CAAEAUJJASCAJXAAAJADSB4SHAEALV6WL7RANADKWLYAABAEZAAB6VCC2AQGAEGWDGB8AAACACEJGUBC. We should improve the error message here to clarify that.

fenhl avatar Feb 23 '25 15:02 fenhl