cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
439
Views
1
Helpful
2
Replies

Errors with ydk-py on docker (codec)

sihart
Cisco Employee
Cisco Employee

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

1 Accepted Solution

Accepted Solutions

abhirame
Cisco Employee
Cisco Employee

This error has to be fixed in the model. An issue has been filed for this:  CSCvj26506

View solution in original post

2 Replies 2

abhirame
Cisco Employee
Cisco Employee

This error has to be fixed in the model. An issue has been filed for this:  CSCvj26506

abhirame
Cisco Employee
Cisco Employee

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: