---------- Forwarded message ---------
From: satish amara <satishkam...@gmail.com>
Date: Thu, Sep 30, 2021 at 3:21 PM
Subject: Re: [vpp-dev] VPP Binary API Python issues.
To: <otr...@employees.org>


In the same code, I am dumping the interface info and IPSEC SA. I don't see
any issue there.
The issue happens only for some binary API.

On Thu, Sep 30, 2021 at 3:19 PM satish amara <satishkam...@gmail.com> wrote:

> I am just using calling the open-source  VPP binary API code from repo
> Just want to know if others are seeing the same issue when they call that
> binary  API.
>
> On Thu, Sep 30, 2021 at 3:01 PM <otr...@employees.org> wrote:
>
>> I don't see this message in the open source VPP.
>> It's likely that the plugin side handler is doing something funky or the
>> API definition is wrong.
>> You can always put some prints in the vpp_serializer to see if you get
>> more insight.
>> If the code isn't open soure there isn't much more we can do to help.
>>
>> O.
>>
>> > On 30 Sep 2021, at 20:55, satish amara <satishkam...@gmail.com> wrote:
>> >
>> >
>> > The VPP version I am using is 21.06
>> >
>> > Traceback (most recent call last):
>> >   File "t1.py", line 63, in <module>
>> >     dump_ikev2_sa()
>> >   File "t1.py", line 53, in dump_ikev2_sa
>> >     for res in  vpp.api.ikev2_sa_dump():
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_papi.py", line
>> 119, in __c      all__
>> >     return self._func(**kwargs)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_papi.py", line
>> 499, in f
>> >     return self._call_vpp(i, msg, multipart, **kwargs)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_papi.py", line
>> 759, in _ca      ll_vpp
>> >     r = self.read_blocking(no_type_conversion, timeout)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_papi.py", line
>> 844, in rea      d_blocking
>> >     return self.decode_incoming_msg(msg, no_type_conversion)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_papi.py", line
>> 642, in dec      ode_incoming_msg
>> >     r, size = msgobj.unpack(msg, ntc=no_type_conversion)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_serializer.py",
>> line 639,       in unpack
>> >     x, size = p.unpack(data, offset, result, ntc)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_serializer.py",
>> line 639,       in unpack
>> >     x, size = p.unpack(data, offset, result, ntc)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_serializer.py",
>> line 639,       in unpack
>> >     x, size = p.unpack(data, offset, result, ntc)
>> >   File "/usr/lib/python3.6/site-packages/vpp_papi/vpp_serializer.py",
>> line 161,       in unpack
>> >     return (s2.decode('ascii'), self.num)
>> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 0:
>> ordinal       not in range(128)
>> > [talariuser@tf2-vpp-update-vpp0 ~]$
>> >
>> > On Thu, Sep 30, 2021 at 2:26 PM <otr...@employees.org> wrote:
>> > Did you include the whole backtrace?
>> > You also want to use python3.
>> >
>> > Cheers,
>> > Ole
>> >
>> > > On 30 Sep 2021, at 19:52, satish amara <satishkam...@gmail.com>
>> wrote:
>> > >
>> > > Hi,
>> > >    I am trying to get IKEv2 SA using Python API. I see  following
>> issue.
>> > > File "./client.py", line 88, in <module>
>> > >     dump_ikev2_sa()
>> > >   File "./client.py", line 65, in dump_ikev2_sa
>> > >     for res in  vpp.api.ikev2_sa_dump():
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_papi.py", line
>> 113, in __call__
>> > >     return self._func(**kwargs)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_papi.py", line
>> 452, in f
>> > >     return self._call_vpp(i, msg, multipart, **kwargs)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_papi.py", line
>> 703, in _call_vpp
>> > >     r = self.read_blocking(no_type_conversion, timeout)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_papi.py", line
>> 788, in read_blocking
>> > >     return self.decode_incoming_msg(msg, no_type_conversion)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_papi.py", line
>> 595, in decode_incoming_msg
>> > >     r, size = msgobj.unpack(msg, ntc=no_type_conversion)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_serializer.py",
>> line 644, in unpack
>> > >     x, size = p.unpack(data, offset, result, ntc)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_serializer.py",
>> line 644, in unpack
>> > >     x, size = p.unpack(data, offset, result, ntc)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_serializer.py",
>> line 644, in unpack
>> > >     x, size = p.unpack(data, offset, result, ntc)
>> > >   File "/usr/lib/python2.7/site-packages/vpp_papi/vpp_serializer.py",
>> line 172, in unpack
>> > >
>> > > Please let me know any suggestions on how to resolve this.
>> > >
>> > > Thanks,
>> > > Satish K Amara
>> > >
>> > > 
>> > >
>> >
>>
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20257): https://lists.fd.io/g/vpp-dev/message/20257
Mute This Topic: https://lists.fd.io/mt/85980204/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to