pyroute2 icon indicating copy to clipboard operation
pyroute2 copied to clipboard

IPBatch: Throws TypeError

Open macliszewski opened this issue 4 years ago • 0 comments

Hi, I've been trying to use IPBatch to create bunch of routes. I've started with an example from documentation to test how it works and when I add something to buffer, e.g:

ipb.link("add", index=550, ifname="test", kind="dummy")

It throws:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/site-packages/pyroute2/iproute/linux.py", line 1114, in link
    msg_flags=msg_flags)
  File "/usr/lib/python3.7/site-packages/pyroute2/netlink/nlsocket.py", line 351, in nlm_request
    return tuple(self._genlm_request(*argv, **kwarg))
  File "/usr/lib/python3.7/site-packages/pyroute2/netlink/nlsocket.py", line 832, in nlm_request
    callback=callback):
  File "/usr/lib/python3.7/site-packages/pyroute2/netlink/nlsocket.py", line 354, in get
    return tuple(self._genlm_get(*argv, **kwarg))

Despite this error data are saved properly in buffer and can be applied using sendto. Python version: 3.7 pyroute2 version: 0.5.12

Is there some additional step to avoid this error that is missing from documentation? Thanks for help

macliszewski avatar Jul 30 '20 13:07 macliszewski