Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

SRX340 error while running series of dev.rpc.pings

‎06-28-2018 05:36 AM

 

I am getting weird error while running python script on SRX340 (running series of pings on different interfaces).

 

/usr/local/lib/python3.6/site-packages/jnpr/junos/device.py:794: RuntimeWarning: An unknown exception occured - please report.
  RuntimeWarning)
Traceback (most recent call last):
  File "./ping_inet6_v0.5_kazan.py", line 172, in <module>
    main()
  File "./ping_inet6_v0.5_kazan.py", line 158, in main
    channel['inet6_mtu'] =  inet6_mtu(dev, channel)
  File "./ping_inet6_v0.5_kazan.py", line 82, in inet6_mtu
    do_not_fragment = True)
  File "/usr/local/lib/python3.6/site-packages/jnpr/junos/rpcmeta.py", line 345, in _exec_rpc
    return self._junos.execute(rpc, **dec_args)
  File "/usr/local/lib/python3.6/site-packages/jnpr/junos/decorators.py", line 76, in wrapper
    return function(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/jnpr/junos/decorators.py", line 31, in wrapper
    return function(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/jnpr/junos/device.py", line 770, in execute
    ignore_warning=ignore_warning)
  File "/usr/local/lib/python3.6/site-packages/jnpr/junos/decorators.py", line 116, in wrapper
    rsp = function(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/jnpr/junos/device.py", line 1321, in _rpc_reply
    return self._conn.rpc(rpc_cmd_e)._NCElement__doc
  File "/usr/local/lib/python3.6/site-packages/ncclient/manager.py", line 172, in wrapper
    return self.execute(op_cls, *args, **kwds)
  File "/usr/local/lib/python3.6/site-packages/ncclient/manager.py", line 232, in execute
    raise_mode=self._raise_mode).request(*args, **kwds)
  File "/usr/local/lib/python3.6/site-packages/ncclient/operations/third_party/juniper/rpc.py", line 44, in request
    return self._request(rpc)
  File "/usr/local/lib/python3.6/site-packages/ncclient/operations/rpc.py", line 339, in _request
    return NCElement(self._reply, self._device_handler.transform_reply())
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 153, in __init__
    self.__doc = self.remove_namespaces(self.__result)
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line 201, in remove_namespaces
    self.__root = etree.fromstring(str(self.__transform(etree.parse(StringIO(str(rpc_reply))))))
  File "src/lxml/etree.pyx", line 3426, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1856, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1067, in lxml.etree._BaseParser._parseUnicodeDoc
  File "src/lxml/parser.pxi", line 600, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 710, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 639, in lxml.etree._raiseParseError
  File "<string>", line 23
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: rpc-error line 15 and xnm:warning, line 23, column 15

Anyone knows what is the problem about and whom am I supposed to report it?