Closed barryCrunch closed 2 years ago
It looks like the issue may be the "receivedOpenMsg" and the "sentOpenMsg" passed back in the notification. It has some characters that are not able to be decoded by python's byte decode
method.
receivedOpenMsg | "\u0004OȀ\u001e\u0002\u0006\u0001\u0004\u0000\u0001\u0000\u0001\u0002\u0002\u0000\u0002\u0002\u0002\u0000\u0002\u0004@\u0002@x\u0002\u0006A\u0004\u0000\u0000OȂ\u0002G\u0000" |
sentOpenMsg | "\u0004ü0\u0000\u001e\nrÿE\u001a\u0002\u0018\u0001\u0004\u0000\u0001\u0000\u0001\u0002\u0000@\u0002A,A\u0004\u0000\u0000ü0E\u0004\u0000\u0001\u0001\u0001"
If you pass ignore to the decode method in decoder.py under the __postProcess
method then everything passes.
def __postProcess(self, b):
if isinstance(b, bytes):
return b.decode("ascii", 'ignore')
elif isinstance(b, list):
return self.decode_array(b)
elif isinstance(b, (dict, FrozenDict)):
return self.decode_map(b)
else:
return b
I'm trying to pull the BGP Peer Status on a particular BGP peer. When I add the peer to the pathElts I get back a 'ascii' codec can't decode error.
Python Version: 3.8.2 Cloudvision Version: cvaas
Here is the Traceback
Not sure where I'm going wrong here.