Hi,
Within chapter - Additional modules - Tabulate (https://pyneng.readthedocs.io/ru/latest/book/12_useful_modules/tabulate.html) found an issue with tabulate. Here is my code:
from tabulate import tabulate
data = {{'IP': '15.0.15.1',
'Interface': 'FastEthernet0/0',
'Protocol': 'up',
'Status': 'up'
},
{'IP': '10.0.12.1',
'Interface': 'FastEthernet0/1',
'Protocol': 'up',
'Status': 'up'},
{'IP': '10.0.13.1',
'Interface': 'FastEthernet0/2',
'Protocol': 'up',
'Status': 'up'},
{'IP': '10.1.1.1',
'Interface': 'Loopback0',
'Protocol': 'up',
'Status': 'up'},
{'IP': '100.0.0.1',
'Interface': 'Loopback100',
'Protocol': 'up',
'Status': 'up'}}
print(tabulate(data, headers='key'))
Traceback (most recent call last):
File "/Users/Retina/PycharmProjects/python-start/Play.py", line 3, in
data = {{'IP': '15.0.15.1',
TypeError: unhashable type: 'dict'
May be something wrong with example or with my script?