cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
205
Views
0
Helpful
2
Replies
Highlighted
Cisco Employee

YCoreError : Couldn't fetch child entity 'extended-nh-encoding-capability-suppressed-info' in parent

Hi,

I am trying to a crud.read() using bgp_oper for ios-xr.

However this error breaks the code


Couldn't fetch child entity extended-nh-encoding-capability-suppressed-info in parent /Cisco-IOS-XR-ipv4-bgp-oper:bgp/config-instances/config-instance[instance-name='default']/config-instance-default-vrf/entity-configurations/entity-configuration[1]/af-independent-config!
Traceback (most recent call last):
File "assurance_master.py", line 165, in <module>
bgp_oper_main(device_netconf ,device_input)
File "assurance_master.py", line 122, in bgp_oper_main
a = crud_service.read(device_netconf,bgp_oper_instance_list_obj)
File "/usr/local/lib/python3.5/dist-packages/ydk/services/crud_service.py", line 65, in read
read_top_entity = self._crud.read(provider, top_filters)
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/usr/local/lib/python3.5/dist-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "<string>", line 1, in <module>
ydk.errors.YCoreError: Couldn't fetch child entity 'extended-nh-encoding-capability-suppressed-info' in parent /Cisco-IOS-XR-ipv4-bgp-oper:bgp/config-instances/config-instance[instance-name='default']/config-instance-default-vrf/entity-configurations/entity-configuration[1]/af-independent-config
Disconnected from device 

 

my code snippet:

bgp_oper_instance_list = bgp_oper_obj.Instances()
        bgp_oper_instance_list_obj = bgp_oper_instance_list.Instance()
        bgp_oper_active_instance_obj = bgp_oper_instance_list_obj.InstanceActive()
        bgp_oper_instance_list.instance.append(bgp_oper_instance_list_obj)
        bgp_oper_active_instance_vrf_list = bgp_oper_active_instance_obj.Vrfs()
        bgp_oper_active_instance_vrf_list_obj  = bgp_oper_active_instance_vrf_list.Vrf()
        bgp_oper_active_instance_vrf_list_obj.vrf_name = "TEST-VRF"
        
        bgp_oper_active_instance_vrf_list.vrf.append(bgp_oper_active_instance_vrf_list_obj)
        a = crud_service.read(device_netconf,bgp_oper_instance_list_obj)
        print("******************************************************")
        print(a.instance_active)
 
please help me bypass this error and get the data i require.
2 REPLIES 2
Highlighted
Participant

Same issues as in bgp-oper-unable-to-read-for-a-particular-vrf-name 

Yan Gorelik
YDK Solutions
Highlighted

Hi Yang, even though I executed the solution as directed, I still get the YcoreError.

 

Couldn't fetch child entity remote-nh-table in parent /Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance[instance-name='default']/instance-active/vrfs/vrf[vrf-name='TEST-VRF']/afs/af[af-name='ipv4-unicast']!
Traceback (most recent call last):
File "assurance_master.py", line 197, in <module>
bgp_oper_main(device_netconf ,device_input)
File "assurance_master.py", line 114, in bgp_oper_main
crud_service.read(device_netconf,bgp_oper_instance_list_obj)
File "/usr/local/lib/python3.5/dist-packages/ydk/services/crud_service.py", line 65, in read
read_top_entity = self._crud.read(provider, top_filters)
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/usr/local/lib/python3.5/dist-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "<string>", line 1, in <module>
ydk.errors.YCoreError: Couldn't fetch child entity 'remote-nh-table' in parent /Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance[instance-name='default']/instance-active/vrfs/vrf[vrf-name='TEST-VRF']/afs/af[af-name='ipv4-unicast']

 

The read function returns this and breaks 

This widget could not be displayed.