cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
151
Views
1
Helpful
2
Replies
Cisco Employee

Errors with ydk-py on docker (codec)

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
Highlighted
Cisco Employee

Re: Errors with ydk-py on docker (codec)

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
Highlighted
Cisco Employee

Re: Errors with ydk-py on docker (codec)

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

View solution in original post

Highlighted
Cisco Employee

Re: Errors with ydk-py on docker (codec)

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

This widget could not be displayed.