in-toto / demo

Securing Alice's, Bob's and Carl's software supply chain using in-toto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running run_demo.py: KeyError: 'Optional Arguments'

nm17 opened this issue · comments

OS: Ubuntu 22.04 jammy
Python: 3.10.4
Version: bf7c77c

(venv) nm17@nm17:~/demo$ pip3 install -r requirements.txt 

[...Non essential pip stuff...]

Successfully installed attrs-21.4.0 cffi-1.15.0 cryptography-36.0.2 in-toto-1.0.1 iso8601-1.0.2 pathspec-0.9.0 pycparser-2.21 python-dateutil-2.8.2 securesystemslib-0.22.0 six-1.16.0
(venv) nm17@nm17:~/demo$ python3 run_demo.py 

Define supply chain layout (Alice) -- press any key to continue
python create_layout.py
Created demo in-toto layout as "root.layout".

Clone source code (Bob) -- press any key to continue
in-toto-run --verbose --step-name clone --products demo-project/foo.py --key bob -- git clone https://github.com/in-toto/demo-project.git
Traceback (most recent call last):
  File "/home/nm17/demo/venv/bin/in-toto-run", line 8, in <module>
    sys.exit(main())
  File "/home/nm17/demo/venv/lib/python3.10/site-packages/in_toto/in_toto_run.py", line 175, in main
    parser = create_parser()
  File "/home/nm17/demo/venv/lib/python3.10/site-packages/in_toto/in_toto_run.py", line 167, in create_parser
    sort_action_groups(parser)
  File "/home/nm17/demo/venv/lib/python3.10/site-packages/in_toto/common_args.py", line 184, in sort_action_groups
    ordered_action_groups.append(action_group_dict[title])
KeyError: 'Optional Arguments'


Can confirm that in-toto/in-toto@92c8dde is the first commit that fixes this issue. Updating to 1.2.0 should fix it.