Closed rtrunk closed 2 years ago
print(textfsm.version) 1.1.0 type="nxos" template = os.environ['NETTEXTFSM'] + "\cisco" + type + "_show_cdp_neighbors_detail.textfsm" print("Using: " + template) Using: C:\repos\ntc-templates\templates\cisco_nxos_show_cdp_neighbors_detail.textfsm try: ... mylist=textfsm.TextFSM(template) ... except Exception as e: ... print(e) ... 'str' object has no attribute 'seek'
change this line
mylist=textfsm.TextFSM(template)
to
from io import StringIO mylist = textfsm.TextFSM(StringIO(template))