01-07-2019 12:48 AM
I tried to run sample code for openconfig BGP and got the below error, this error received even when run the same sample code from vagrant virtual vm
auto@yang-vm:~/ydk-py-samples/samples/basic/codec/models/openconfig/openconfig-bgp$ python3 cd-encode-oc-bgp-44-ydk.py
Traceback (most recent call last):
File "cd-encode-oc-bgp-44-ydk.py", line 99, in <module>
print(codec.encode(provider, bgp))
File "/home/auto/.local/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 112, in helper
return func(self, provider, entity, *args, **kwargs)
File "/home/auto/.local/lib/python3.6/site-packages/ydk/services/codec_service.py", line 78, in encode
return self._encode(provider, entity_holder, pretty, subtree)
File "/home/auto/.local/lib/python3.6/site-packages/ydk/services/codec_service.py", line 110, in _encode
return result
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/home/auto/.local/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/home/auto/.local/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "<string>", line 1, in <module>
ydk.errors.YModelError: Invalid value "192.168.1.1" in "neighbor-address" element. Path: /openconfig-bgp:bgp/neighbors/neighbor[neighbor-address='192.168.1.1']/neighbor-address
Solved! Go to Solution.
01-07-2019 08:37 AM
01-07-2019 08:37 AM
01-07-2019 11:12 AM - edited 01-07-2019 11:15 AM
Many thanks for your support, I fixed for bgp and it is working fine, below link for the fixed yang, json, and source distribution.
01-07-2019 11:14 AM - edited 01-07-2019 11:16 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide