informalsystems/modelator

[BUG] Load command fails

andrey-kuprianov opened this issue · 0 comments

Trying to load a model fails. Steps to reproduce; in the repo root:

poetry shell
pip install -U .
modelator load tests/sampleFiles/check/Hello.tla

produces the following:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/andrey/Library/Caches/pypoetry/virtualenvs/atomkraft-9j0E0YDD-py3.10/lib/python3.10/site- │
│ packages/modelator/cli/__init__.py:113 in load                                                   │
│                                                                                                  │
│   110 │   │   config = load_config_file(path)                                                    │
│   111 │   │   model_path = config["model_path"]                                                  │
│   112 │                                                                                          │
│ ❱ 113 │   print(f"Loading {model_path}... ")                                                     │
│   114 │   model = _create_and_parse_model(model_path)                                            │
│   115 │   ModelFile.save(model)                                                                  │
│   116 │   print("Loading OK ✅")                                                                 │
│                                                                                                  │
│ ╭─────────── locals ───────────╮                                                                 │
│ │ path = 'models/transfer.tla' │                                                                 │
│ ╰──────────────────────────────╯                                                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UnboundLocalError: local variable 'model_path' referenced before assignment