Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pyats.utils.exception : Missing keys when a test playbook ran against sbx

See original GitHub issue

Having issues running a test playbook (with genie learn arp module) and the following exception returned:

 pyats.utils.exceptions.SchemaMissingKeyError: Missing keys:
      "connections"  parent: []
      "type"  parent: []

As it was advised by clay584/genie_collection here: this seems to be an issues with the parser.

The full output can be found below:

(.venv) [root@292c4c38a3f8 genie_collection-master]# pwd
(.venv) [root@292c4c38a3f8 genie_collection-master]# tree
|-- Pipfile
|-- Pipfile.lock
|-- ansible.cfg
|-- clay584
|   `-- genie
|       |--
|       |-- clay584-genie-0.1.7.tar.gz
|       |-- colored_diff.png
|       |-- galaxy.yml
|       |-- learn_genie_params.png
|       `-- plugins
|           |-- filter
|           |   `--
|           `-- modules
|               |-- args.json
|               `--
|-- genie_filter_testing.yml
|-- inventory
|-- test.yml
|-- test_arp.yaml
-- yamllint_config.yml
5 directories, 19 files
(.venv) [root@292c4c38a3f8 genie_collection-master]# cat test_arp.yaml
- hosts: all
  gather_facts: false
  connection: local
   - clay584.genie
    - name: Learn Genie - ARP
        host: "{{ ansible_host }}"
        port: 8181
        protocol: ssh
        username: admin
        password: Admin_1234!
        os: nxos
        feature: arp
      register: genie_arp1
    - name: Debug Genie
        msg: "{{ genie_arp1 }}"
(.venv) [root@292c4c38a3f8 genie_collection-master]# ansible --version
ansible 2.10.6
  config file = /genie_collection-master/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules', '/genie_collection-master/clay584/genie/plugins/modules']
  ansible python module location = /.venv/lib64/python3.6/site-packages/ansible
  executable location = /.venv/bin/ansible
  python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
(.venv) [root@292c4c38a3f8 genie_collection-master]# cat inventory
      ansible_connection: local
      ansible_python_interpreter: "{{ ansible_playbook_python }}"
(.venv) [root@292c4c38a3f8 genie_collection-master]# ansible-playbook test_arp.yaml -i inventory -v
Using /genie_collection-master/ansible.cfg as config file

PLAY [all] ************************************************************************************************************************************************************

TASK [Learn Genie - ARP] **********************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was:   "connections"  parent: []
fatal: []: FAILED! => changed=false
  module_stderr: |-
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-tmp-1615507860.465231-957-197841320397725/", line 102, in <module>
      File "/root/.ansible/tmp/ansible-tmp-1615507860.465231-957-197841320397725/", line 94, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/.ansible/tmp/ansible-tmp-1615507860.465231-957-197841320397725/", line 40, in invoke_module
        runpy.run_module(mod_name='ansible_collections.clay584.genie.plugins.modules.learn_genie', init_globals=None, run_name='__main__', alter_sys=True)
      File "/usr/lib64/python3.6/", line 205, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib64/python3.6/", line 96, in _run_module_code
        mod_name, mod_spec, pkg_name, script_name)
      File "/usr/lib64/python3.6/", line 85, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_learn_genie_payload_s18eg0q9/", line 367, in <module>
      File "/tmp/ansible_learn_genie_payload_s18eg0q9/", line 363, in main
      File "/tmp/ansible_learn_genie_payload_s18eg0q9/", line 296, in run_module
      File "src/genie/", line 4, in genie.testbed.load
      File "src/genie/conf/", line 81, in genie.conf.main.Genie.init
      File "/.venv/lib64/python3.6/site-packages/pyats/topology/loader/", line 41, in load
        return TestbedFileLoader(**init_kwargs).load(loadable, **kwargs)
      File "src/pyats/utils/yaml/", line 134, in pyats.utils.yaml.loader.Loader.load
      File "src/pyats/utils/", line 403, in pyats.utils.schemaengine.Schema.validate
    pyats.utils.exceptions.SchemaMissingKeyError: Missing keys:
      "type"  parent: []
      "connections"  parent: []
  module_stdout: ''
  msg: |-
    See stdout/stderr for the exact error
  rc: 1

PLAY RECAP ************************************************************************************************************************************************************    : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

danielgrazianocommented, Apr 8, 2021

@bronitskiy just an update, I should be releasing a new package today with the fix.

danielgrazianocommented, Mar 31, 2021

@clay584 Sorry I deleted my previous comment as this seems to be an issue on our side. Looking into it further.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pyats.utils package — pyATS Documentation - DevNet
If exact key/value match is found, they're excluded to avoid redundant information. Parameters. source_dict (dict) – keys in this dictionary are compared ...
Read more >
Getting Started with pyATS (and Genie) - Cisco Developer
PyATS is a python framework to help you test your network! Like, actual functional testing!!
Read more >
Simple index - piwheels
... micropython-gnssl76l duhdoy carla-utils imapmail-mod d8s-pdfs legos-apod dns-eco zcore p0f micropython-sqlite3 pycel zezfio fact-test-001 fortran-binary ...
Read more >
First steps with pyATS -
Here are my first steps with pyATS and GENIE: Network Test & Automation ... The “home” of pyATS is located on the Cisco...
Read more >
Parsing Strategies - PyATS Genie Parsers | The NTC Mag
Parser class: This class defines the actual parsing methods for the specific command. One key difference between what we've covered so far and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found