cisco-ie / telemetry_stacks

Docker Streaming Telemetry Stacks to develop against
Apache License 2.0
10 stars 2 forks source link

Trying print_telemetry.py #4

Open Andressg07 opened 5 years ago

Andressg07 commented 5 years ago

Hello,

I'm testing the code to consume ios-xe telemetry in my local machine but I always get this error, I would like to test in physical devices.

Traceback (most recent call last): File "print_telemetry.py", line 104, in telem.single_sub(xpath, period=5000) File "print_telemetry.py", line 85, in single_sub self.establish_sub(xpath, args) File "print_telemetry.py", line 70, in establish_sub dampening_period=dampening_period) File "C:\Users\xxxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\ncclient\manager.py", line 272, in _missing subele(root, arg) File "C:\Users\xxxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\ncclient\xml.py", line 211, in sub_ele = lambda parent, tag, attrs={}, extra: etree.SubElement(parent, qualify(tag), attrs, **extra) File "src\lxml\etree.pyx", line 3112, in lxml.etree.SubElement File "src\lxml\apihelpers.pxi", line 179, in lxml.etree._makeSubElement File "src\lxml\apihelpers.pxi", line 1626, in lxml.etree._tagValidOrRaise ValueError: Invalid tag name '<bound method TelemetryIOSXE.callback of <main.TelemetryIOSXE object at 0x0100DBD0>>'

I'm wondering if you change some code in ncclient in order to get it work. I'm testing the same ios version and ncclient. But I couldn't make it work.

I dont know if this is the rigth place to ask, but I didn't find other.

Thaks.

hisaza commented 5 years ago

Try installing this: pip install --upgrade git+https://github.com/CiscoDevNet/ncclient.git I had this same error and realized/found out Cisco had their own ncclient.

Andressg07 commented 5 years ago

Try installing this: pip install --upgrade git+https://github.com/CiscoDevNet/ncclient.git I had this same error and realized Cisco had their own ncclient.

Thanks so much Hector, now is working.