You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2018-03-21 16:22:04,039 - ydk - DEBUG - Top container path: openconfig-bgp:bgp
2018-03-21 16:22:04,039 - ydk - DEBUG - Looking to populate schemas for afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']
2018-03-21 16:22:04,039 - ydk - DEBUG - Ready to populate schemas for afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']
2018-03-21 16:22:04,039 - ydk - DEBUG - Getting new modules for afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']
2018-03-21 16:22:04,039 - ydk - DEBUG - Getting new modules for afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']
2018-03-21 16:22:04,040 - ydk - DEBUG - Getting child schema with path 'afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']' in afi-safis
2018-03-21 16:22:04,040 - ydk - DEBUG - Getting data nodes with path 'afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']'
2018-03-21 16:22:04,040 - ydk - DEBUG - Creating new data path 'afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']' with value '' in 'afi-safis'
2018-03-21 16:22:04,040 - ydk - ERROR - Data is invalid according to the yang model. Error details: Unexpected character(s) '<' (<ydk.models.ope). Path: '/openconfig-bgp:bgp/global/afi-safis/afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']/afi-safi-name'
Traceback (most recent call last):
File "./nc-create-oc-bgp-40-ydk.py", line 108, in <module>
crud.create(provider, bgp)
File "/Users//p/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 112, in helper
return func(self, provider, entity, *args, **kwargs)
File "/Users//p/lib/python3.6/site-packages/ydk/services/crud_service.py", line 45, in create
return self._crud.create(provider, entity)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/Users//p/lib/python3.6/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/Users//p/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.YPYModelError: Unexpected character(s) '<' (<ydk.models.ope). Path: /openconfig-bgp:bgp/global/afi-safis/afi-safi[afi-safi-name='<ydk.models.openconfig.openconfig_bgp_types.IPV4UNICAST object at 0x1057a9468>']/afi-safi-name
System Information
Using ydk-gen master branch with openconfig 0.1.4 bundle
The text was updated successfully, but these errors were encountered:
Thanks for creating this issue @abhikeshav
I believe this issue rose after the native python issues change. My guess is since the sanity tests are passing, it has to do with unexpected behavior in retrieving the segment path. It seems to me that segment path retrieval for most cases will return a string, but in some cases the object printout is returned. My guess for these corner cases is where the object is a child list object.
Two things:
investigate how GetSegmentPath() is being called in pytypes.py / how it's been implemented
write add a test across cpp/py/go to cover cases like this in the future
Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.
Expected Behavior
The object should be correctly encoded
Current Behavior
Seeing erroneous payload
Steps to Reproduce
Use the below script
Your Script
Logs
Enable logging and post the logs below
System Information
Using ydk-gen master branch with
openconfig 0.1.4
bundleThe text was updated successfully, but these errors were encountered: