04-30-2018 05:53 AM
Hi,
I am using the docker image of ydk-py 0.7.1 and am running the XE Codec sample - cd-encode-xe-native-interface-native-30-ydk.py
When running the sample the following error is thrown:-
2018-04-30 12:13:30,519 - ydk - ERROR - Data is invalid according to the yang model. Error details: Invalid keyword "((\d+(-\d+)?)(,(\d+(-\d+)?))*)"".
2018-04-30 12:13:30,521 - ydk - ERROR - Data is invalid according to the yang model. Error details: Module "Cisco-IOS-XE-types" parsing failed.
2018-04-30 12:13:30,521 - ydk - ERROR - Data is invalid according to the yang model. Error details: Importing "Cisco-IOS-XE-types" module into "Cisco-IOS-XE-native" failed.
2018-04-30 12:13:30,522 - ydk - ERROR - Data is invalid according to the yang model. Error details: Module "Cisco-IOS-XE-native" parsing failed.
2018-04-30 12:13:30,533 - ydk - ERROR - Data is invalid according to the yang model. Error details: Invalid keyword "((\d+(-\d+)?)(,(\d+(-\d+)?))*)"".
2018-04-30 12:13:30,533 - ydk - ERROR - Data is invalid according to the yang model. Error details: Module "Cisco-IOS-XE-types" parsing failed.
2018-04-30 12:13:30,533 - ydk - ERROR - Data is invalid according to the yang model. Error details: Importing "Cisco-IOS-XE-types" module into "Cisco-IOS-XE-native" failed.
2018-04-30 12:13:30,533 - ydk - ERROR - Data is invalid according to the yang model. Error details: Module "Cisco-IOS-XE-native" parsing failed.
2018-04-30 12:13:30,534 - ydk - ERROR - Data is invalid according to the yang model. Error details: Module not found. Path: '/Cisco-IOS-XE-native'
2018-04-30 12:13:30,534 - ydk - ERROR - Path 'Cisco-IOS-XE-native:native' is invalid
Traceback (most recent call last):
File "./cd-encode-xe-native-10-ydk.py", line 70, in <module>
print(codec.encode(provider, native))
File "/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py", line 112, in helper
return func(self, provider, entity, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ydk/services/codec_service.py", line 78, in encode
return self._encode(provider, entity_holder, pretty, subtree)
File "/usr/local/lib/python2.7/dist-packages/ydk/services/codec_service.py", line 110, in _encode
return result
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py", line 56, in _raise
raise exc
ydk.errors.YInvalidArgumentError: Path is invalid: Cisco-IOS-XE-native:native
I have also tried to use ydk-py 0.7.1 with the XR models against XRv and also seeing similar errors, that is 'ydk.errors.YInvalidArgumentError: Path is invalid:'
Any advice, or further information required?
Thanks
Solved! Go to Solution.
05-01-2018 07:57 AM
This error has to be fixed in the model. An issue has been filed for this: CSCvj26506
05-01-2018 07:57 AM
This error has to be fixed in the model. An issue has been filed for this: CSCvj26506
05-02-2018 07:18 AM
As a workaround, you could try editing the model located in /root/.ydk/*/Cisco-IOS-XE-types
to change the pattern from double quote to single quote
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