ImportError: cannot import name 'ListOf' from 'genie.metaparser.util.schemaengine'
Hello,
Traceback (most recent call last):
File "main.py", line 4, in
What went wrong here?
reddy-t, I dont see an issue in 3.7, I tested and it worked fine, can you please test like this below ? or if this doesnt work, try re-installing the pyats pip install pyats[full]
Python 3.7.12 (default, Oct 22 2021, 17:50:30)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from genie.metaparser.util.schemaengine import Any, Optional, Or, ListOf
>>> schema = {
Optional('load_time'): str,
Optional('one_minute'): str,
Optional('five_minutes'): str,
Optional('ntp_time'): str,
Optional('no_eventlog_found'): bool,
Optional('event_log'): ListOf(
{'log_message': str}
)
}
>>>