<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ERROR - Data is invalid according to the yang model. in Tools</title>
    <link>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096224#M1909</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the YDK docker image, so I'm assuming that the software versions are correct, but regardless of the code that I write I get the following bunch of errors:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;2020-06-02 15:05:58,515 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,516 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,517 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,518 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,519 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "cisco-xe-openconfig-interfaces-deviation" failed.
2020-06-02 15:05:58,520 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-interfaces-deviation" parsing failed.
2020-06-02 15:05:58,527 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,528 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,529 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,529 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,530 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.
2020-06-02 15:05:58,530 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-if-ip" parsing failed.
2020-06-02 15:05:58,533 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,533 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,534 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,535 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,536 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.
2020-06-02 15:05:58,536 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-if-ip" parsing failed.
2020-06-02 15:05:58,536 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-if-ip" module into "cisco-xe-openconfig-if-ip-deviation" failed.
2020-06-02 15:05:58,537 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-if-ip-deviation" parsing failed.
2020-06-02 15:05:58,538 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,539 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,540 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,540 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,541 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "cisco-xe-openconfig-interfaces-deviation" failed.
2020-06-02 15:05:58,541 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-interfaces-deviation" parsing failed.&lt;/PRE&gt;&lt;P&gt;The code I'm using as a test case is really simple:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from ydk.models.openconfig import openconfig_interfaces as oc_if
from ydk.models.cisco_ios_xe import Cisco_IOS_XE_interfaces_oper as xe_if
from ydk.services import CRUDService
from ydk.providers import NetconfServiceProvider

provider = NetconfServiceProvider(address="192.168.121.231",port=830,username="root",password="foobar")

crud = CRUDService()
oc_ints = crud.read(provider, oc_if.Interfaces())
xe_ints = crud.read(provider, xe_if.Interfaces())&lt;/PRE&gt;&lt;P&gt;It doesn't really matter what I do after that, it seems to fail to populate the binding regardless, and if I look at the verbose logging output I see the errors listed above, but I also see the netconf data coming back from the device. So, it's definitely getting the right data from the device, it's just not able to populate the binding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried against XE versions 16.12.3, 16.9.3, and 16.8.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have any feedback for me? My code could definitely be faulty too, but just looking for another set of eyes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2020 15:34:10 GMT</pubDate>
    <dc:creator>datavailops</dc:creator>
    <dc:date>2020-06-02T15:34:10Z</dc:date>
    <item>
      <title>ERROR - Data is invalid according to the yang model.</title>
      <link>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096224#M1909</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the YDK docker image, so I'm assuming that the software versions are correct, but regardless of the code that I write I get the following bunch of errors:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;2020-06-02 15:05:58,515 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,516 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,517 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,518 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,519 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "cisco-xe-openconfig-interfaces-deviation" failed.
2020-06-02 15:05:58,520 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-interfaces-deviation" parsing failed.
2020-06-02 15:05:58,527 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,528 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,529 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,529 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,530 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.
2020-06-02 15:05:58,530 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-if-ip" parsing failed.
2020-06-02 15:05:58,533 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,533 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,534 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,535 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,536 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.
2020-06-02 15:05:58,536 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-if-ip" parsing failed.
2020-06-02 15:05:58,536 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-if-ip" module into "cisco-xe-openconfig-if-ip-deviation" failed.
2020-06-02 15:05:58,537 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-if-ip-deviation" parsing failed.
2020-06-02 15:05:58,538 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".
2020-06-02 15:05:58,539 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.
2020-06-02 15:05:58,540 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.
2020-06-02 15:05:58,540 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.
2020-06-02 15:05:58,541 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "cisco-xe-openconfig-interfaces-deviation" failed.
2020-06-02 15:05:58,541 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-interfaces-deviation" parsing failed.&lt;/PRE&gt;&lt;P&gt;The code I'm using as a test case is really simple:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from ydk.models.openconfig import openconfig_interfaces as oc_if
from ydk.models.cisco_ios_xe import Cisco_IOS_XE_interfaces_oper as xe_if
from ydk.services import CRUDService
from ydk.providers import NetconfServiceProvider

provider = NetconfServiceProvider(address="192.168.121.231",port=830,username="root",password="foobar")

crud = CRUDService()
oc_ints = crud.read(provider, oc_if.Interfaces())
xe_ints = crud.read(provider, xe_if.Interfaces())&lt;/PRE&gt;&lt;P&gt;It doesn't really matter what I do after that, it seems to fail to populate the binding regardless, and if I look at the verbose logging output I see the errors listed above, but I also see the netconf data coming back from the device. So, it's definitely getting the right data from the device, it's just not able to populate the binding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried against XE versions 16.12.3, 16.9.3, and 16.8.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have any feedback for me? My code could definitely be faulty too, but just looking for another set of eyes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 15:34:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096224#M1909</guid>
      <dc:creator>datavailops</dc:creator>
      <dc:date>2020-06-02T15:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR - Data is invalid according to the yang model.</title>
      <link>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096379#M1910</link>
      <description>&lt;P&gt;This issue and solution were discussed in &lt;A href="https://community.cisco.com/t5/yang-development-kit-ydk/getting-ip-address-via-openconfig-models/td-p/4081266" target="_self"&gt;this&lt;/A&gt; post. In short, you need reinstall libydk and python core package.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 18:49:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096379#M1910</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-06-02T18:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR - Data is invalid according to the yang model.</title>
      <link>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096406#M1911</link>
      <description>&lt;P&gt;Thanks for the feedback. I did see that post, but I'm using the docker image, so I figured it was using the updated version already, and I checked the installed version, which appears to be 0.8.4:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;root@1b823eb0ee13:~# pip freeze | grep ydk
ydk==0.8.4
ydk-models-cisco-ios-xe==16.9.3
ydk-models-cisco-ios-xr==6.6.2
ydk-models-cisco-nx-os==9.2.3
ydk-models-ietf==0.1.5.post2
ydk-models-openconfig==0.1.8
ydk-service-gnmi==0.4.0.post1
root@1b823eb0ee13:~#&lt;/PRE&gt;&lt;P&gt;In any case, I did try going through the instructions in that post, but the ./generate step fails on a number of module imports. I tried pip installing them, but it appears that pip defaults to pip3, but python defaults to 2.7, so they weren't showing up. I ran the generate.py script with python3 after installing the missing modules which worked. Finally, I realized that my python script was also using 2.7, so after running that with 3 it works now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 19:28:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-data-is-invalid-according-to-the-yang-model/m-p/4096406#M1911</guid>
      <dc:creator>datavailops</dc:creator>
      <dc:date>2020-06-02T19:28:09Z</dc:date>
    </item>
  </channel>
</rss>

