<?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 Re: YDK-GEN Libyang error seen in generated Cisco-ios-xr packages in Tools</title>
    <link>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4129448#M1756</link>
    <description>Hi Yan,&lt;BR /&gt;Thanks for the steps. It has helped me build and install YDK core successfully.&lt;BR /&gt;But with one server I am still facing libyang error aa below,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Provider = NetconfServiceProvider(address="7.30.13.56", username="root",password="root123")&lt;BR /&gt;2020-08-03 12:10:01,100 - ydk - INFO - Path where models are to be downloaded: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 12:10:01,100 - ydk - INFO - Path where models are to be downloaded: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "type" as a child to "annotation". Path: '/'&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "type" as a child to "annotation". Path: '/'&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "yang" parsing failed.&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "yang" parsing failed.&lt;BR /&gt;2020-08-03 12:10:01,102 - ydk - ERROR - Could not create repository in: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 12:10:01,102 - ydk - ERROR - Could not create repository in: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;&lt;BR /&gt;I doubted it could be a yanglint error and tried installing libyang with below steps and set env, but still facing one or other error related to yanglint&lt;BR /&gt;&lt;BR /&gt;git clone &lt;A href="https://github.com/CESNET/libyang" target="_blank"&gt;https://github.com/CESNET/libyang&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;cd libyang/&lt;BR /&gt;&lt;BR /&gt;ldconfig&lt;BR /&gt;&lt;BR /&gt;mkdir build; cd build&lt;BR /&gt;&lt;BR /&gt;cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/lib ..&lt;BR /&gt;&lt;BR /&gt;make&lt;BR /&gt;&lt;BR /&gt;make install&lt;BR /&gt;export LIBYANG_USER_TYPES_PLUGINS_DIR=/usr/lib64/libyang1/user_types&lt;BR /&gt;export LIBYANG_EXTENSIONS_PLUGINS_DIR=/usr/local/lib/bin/yanglint&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Provider = NetconfServiceProvider(address="7.30.13.56", username="root",password="root123")&lt;BR /&gt;2020-08-03 15:57:57,480 - ydk - INFO - Path where models are to be downloaded: /root/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 15:57:57,492 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Memory allocation failed (resolve_extension()).&lt;BR /&gt;2020-08-03 15:57:57,492 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "yang" parsing failed.&lt;BR /&gt;2020-08-03 15:57:57,493 - ydk - ERROR - Could not create repository in: /root/.ydk/7.30.13.56&lt;BR /&gt;&lt;BR /&gt;Could you please help with libyang/yanglint installation steps and environment variables and also should I need to run via sudo?&lt;BR /&gt;Thanks,&lt;BR /&gt;Kousalya&lt;BR /&gt;</description>
    <pubDate>Mon, 03 Aug 2020 10:44:33 GMT</pubDate>
    <dc:creator>kmathiya</dc:creator>
    <dc:date>2020-08-03T10:44:33Z</dc:date>
    <item>
      <title>YDK-GEN Libyang error seen in generated Cisco-ios-xr packages</title>
      <link>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4127572#M1754</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I have compiled models of version 7.3.1 16I in &lt;STRONG&gt;ENV (Python 3.6.7, YDK 0.8.4, Pyang 1.6)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Generated cisco-ios-xr bundle successfully and installed the same.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;Issue 1 :&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;But I am getting Libyang errors with few models of version (7.3.1 16I), Whereas the same models of same version(7.3.1 16I) works fine when compiled and ran with ENV(&lt;STRONG&gt;Python 3.5, YDK0.5.5, Pyang 1.6&lt;/STRONG&gt;) (All CRUD operations are executed w/o model/schema error and thereby config is pushed into device).&lt;/P&gt;
&lt;P&gt;Note : Version of both compiled model and device model is same. So I hope there is no diff to lead schema mismatch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;Issue 2 :&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Also I can see deviation files are missing in created bundle with &lt;STRONG&gt;ENV (python 3.6.7, YDK 0.8.4, Pyang 1.6)&lt;/STRONG&gt;, though all the deviation models are added in the yang folder to be compiled. Is this something creating libyang errors?&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;ls /auto/tftp-access-ops/cafy_ydk0.8.3/env3.6.7/lib/python3.6/site-packages/ydk/models/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;__init__.py cisco_ios_xr cisco_thinxr_install ietf openconfig openconfig_network_instance&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me to resolve this discrepancy?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Steps followed to compile models with 0.8.4:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Step 1 :&lt;/P&gt;
&lt;P&gt;Sourced the&amp;nbsp;&lt;STRONG&gt;ENV (python 3.6.7, YDK 0.8.4, Pyang 1.6)&lt;/STRONG&gt; and copied all yang models(which includes openconfig, ietf, cisco-ios-xr, devaiation files) to location ~yang/731_16I/&lt;/P&gt;
&lt;P&gt;Step 2 :&lt;/P&gt;
&lt;P&gt;Checked for PYANG errors and resolved if any.&lt;/P&gt;
&lt;P&gt;Step 3 :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Update file&amp;nbsp;profiles/bundles/cisco-ios-xr_7_3_1I.json as below,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;FONT size="2"&gt;&lt;EM&gt;Note: I didnt add any dependency of ietf/openconfig since i added all models under same folder and compiled all together as a cisco-ios-xr bundle.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "name": "cisco-ios-xr",&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&lt;SPAN&gt;&amp;nbsp; "version": "7.2.1",&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;gt;&amp;gt;&amp;gt; change version&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "core_version": "0.5.5",&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "author": "Cisco",&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "copyright": "Cisco",&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "description": "YDK bundle for Cisco IOS XR models",&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "long_description": "This YANG Development Kit (YDK) bundle provides APIs for Cisco IOS XR YANG models.",&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; "models": {&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dir": [&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "yang/PROD_BUILD_7_3_1_07I&lt;/SPAN&gt;" &amp;gt;&amp;gt;&amp;gt; Change new Yang path&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT size="2" face="courier new,courier" color="#993300"&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Step 4 :&lt;/P&gt;
&lt;P&gt;Compile&amp;nbsp;using command ./generate.py --bundle profiles/bundles/cisco-ios-xr_7_3.1.json --python -i&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Snapshot of few libyang errors&lt;/STRONG&gt;&lt;/U&gt;(same model works well with ydk 0.5.5),&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#000000"&gt;Error 1:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#000000"&gt;2020-07-27 13:24:20,639 - ydk - Debug--- - Creating new data path 'source-address' with value '2404:6800:4000::/37' in 'config'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#000000"&gt;Debug---:ydk:Creating new data path 'source-address' with value '2404:6800:4000::/37' in 'config'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#000000"&gt;2020-07-27 13:24:20,640 - ydk - Error--- - Data is invalid according to the yang model. Libyang error: Value "2404:6800:4000::/37" does not satisfy the constraint "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])$" (range, length, or pattern). Path: '/openconfig-acl:acl/acl-sets/acl-set[name='config008'][type='openconfig-acl:ACL_IPV6']/acl-entries/acl-entry[sequence-id='10']/ipv6/config/source-address'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#000000"&gt;2020-07-27 13:24:20,640 - ydk - Error--- - Data is invalid according to the yang model. Libyang error: Value "2404:6800:4000::/37" does not satisfy the constraint "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])$" (range, length, or pattern). Path: '/openconfig-acl:acl/acl-sets/acl-set[name='config008'][type='openconfig-acl:ACL_IPV6']/acl-entries/acl-entry[sequence-id='10']/ipv6/config/source-address'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#000000"&gt;Error---:ydk:Data is invalid according to the yang model. Libyang error: Value "2404:6800:4000::/37" does not satisfy the constraint "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])$" (range, length, or pattern). Path: '/openconfig-acl:acl/acl-sets/acl-set[name='config008'][type='openconfig-acl:ACL_IPV6']/acl-entries/acl-entry[sequence-id='10']/ipv6/config/source-address'&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#000000"&gt;Error 2:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#993300"&gt;&lt;SPAN style="caret-color: #000000; color: #000000; font-family: -apple-system, 'Segoe UI', 'Segoe UI Emoji', sans-serif, Meiryo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration: none; display: inline !important; float: none;"&gt;Error---:ydk:Data is invalid according to the yang model. Libyang error: Invalid value "" in "frequency-priority" element. Path: '/Cisco-IOS-XR-ptp-cfg:ptp/frequency-priority'&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR style="-webkit-user-select: all; color: #000000; background-color: #ffffff; caret-color: #000000; font-family: -apple-system, 'Segoe UI', 'Segoe UI Emoji', sans-serif, Meiryo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" /&gt;&lt;FONT size="2" color="#993300"&gt;&lt;SPAN style="caret-color: #000000; color: #000000; font-family: -apple-system, 'Segoe UI', 'Segoe UI Emoji', sans-serif, Meiryo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration: none; display: inline !important; float: none;"&gt;*** ydk.errors.YModelError: Invalid value "" in "frequency-priority" element. Path: /Cisco-IOS-XR-ptp-cfg:ptp/frequency-priority&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#993300"&gt;&lt;SPAN style="caret-color: #000000; color: #000000; font-family: -apple-system, 'Segoe UI', 'Segoe UI Emoji', sans-serif, Meiryo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration: none; display: inline !important; float: none;"&gt;Error 3:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#993300"&gt;&lt;SPAN style="caret-color: #000000; color: #000000; font-family: -apple-system, 'Segoe UI', 'Segoe UI Emoji', sans-serif, Meiryo; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration: none; display: inline !important; float: none;"&gt;&lt;FONT size="2"&gt;Error---:ydk:Data is invalid according to the yang model. Libyang error: Invalid value "install-replace" in "available-action" element. Path: '/Cisco-IOS-XR-i&lt;/FONT&gt;nstall-augmented-oper:install/request/verbose/available-actions/available-action[.='install-replace']&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kousalya&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 18:00:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4127572#M1754</guid>
      <dc:creator>kmathiya</dc:creator>
      <dc:date>2020-07-29T18:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: YDK-GEN Libyang error seen in generated Cisco-ios-xr packages</title>
      <link>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4128962#M1755</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Kousalya&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Issue_1&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;You cannot compare YDK 0.5.5. and 0.8.x, because they have different basis and therefore generate different bundle code.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Issue_2&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;You need recompile and install YDK from source. The latest YDK-0.8.5 is in the master branch and available for installation from source (I believe the artifacts currently not available). Here is simple procedure (assuming all dependencies have already been satisfied):&lt;/P&gt;&lt;PRE&gt;git clone https://github.com/CiscoDevNet/ydk-gen.git&lt;BR /&gt;cd ydk-gen&lt;BR /&gt;# enable Python3 virtual environment&lt;BR /&gt;pip install -r requirements.txt&lt;BR /&gt;python generate.py --core --cpp -is  # needs sudo access for installation&lt;BR /&gt;python generate.py --core --py -i&lt;BR /&gt;# if gNMI service needed&lt;BR /&gt;python generate.py --service profiles/services/gnmi-0.4.0.json --cpp -is # needs sudo access&lt;BR /&gt;python generate.py --service profiles/services/gnmi-0.4.0.json --py -i&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Good luck!&lt;/P&gt;</description>
      <pubDate>Sat, 01 Aug 2020 06:56:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4128962#M1755</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-08-01T06:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: YDK-GEN Libyang error seen in generated Cisco-ios-xr packages</title>
      <link>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4129448#M1756</link>
      <description>Hi Yan,&lt;BR /&gt;Thanks for the steps. It has helped me build and install YDK core successfully.&lt;BR /&gt;But with one server I am still facing libyang error aa below,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Provider = NetconfServiceProvider(address="7.30.13.56", username="root",password="root123")&lt;BR /&gt;2020-08-03 12:10:01,100 - ydk - INFO - Path where models are to be downloaded: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 12:10:01,100 - ydk - INFO - Path where models are to be downloaded: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "type" as a child to "annotation". Path: '/'&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Invalid keyword "type" as a child to "annotation". Path: '/'&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "yang" parsing failed.&lt;BR /&gt;2020-08-03 12:10:01,101 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "yang" parsing failed.&lt;BR /&gt;2020-08-03 12:10:01,102 - ydk - ERROR - Could not create repository in: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 12:10:01,102 - ydk - ERROR - Could not create repository in: /users/kmathiya/.ydk/7.30.13.56&lt;BR /&gt;&lt;BR /&gt;I doubted it could be a yanglint error and tried installing libyang with below steps and set env, but still facing one or other error related to yanglint&lt;BR /&gt;&lt;BR /&gt;git clone &lt;A href="https://github.com/CESNET/libyang" target="_blank"&gt;https://github.com/CESNET/libyang&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;cd libyang/&lt;BR /&gt;&lt;BR /&gt;ldconfig&lt;BR /&gt;&lt;BR /&gt;mkdir build; cd build&lt;BR /&gt;&lt;BR /&gt;cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/lib ..&lt;BR /&gt;&lt;BR /&gt;make&lt;BR /&gt;&lt;BR /&gt;make install&lt;BR /&gt;export LIBYANG_USER_TYPES_PLUGINS_DIR=/usr/lib64/libyang1/user_types&lt;BR /&gt;export LIBYANG_EXTENSIONS_PLUGINS_DIR=/usr/local/lib/bin/yanglint&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Provider = NetconfServiceProvider(address="7.30.13.56", username="root",password="root123")&lt;BR /&gt;2020-08-03 15:57:57,480 - ydk - INFO - Path where models are to be downloaded: /root/.ydk/7.30.13.56&lt;BR /&gt;2020-08-03 15:57:57,492 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Memory allocation failed (resolve_extension()).&lt;BR /&gt;2020-08-03 15:57:57,492 - ydk - ERROR - Data is invalid according to the yang model. Libyang error: Module "yang" parsing failed.&lt;BR /&gt;2020-08-03 15:57:57,493 - ydk - ERROR - Could not create repository in: /root/.ydk/7.30.13.56&lt;BR /&gt;&lt;BR /&gt;Could you please help with libyang/yanglint installation steps and environment variables and also should I need to run via sudo?&lt;BR /&gt;Thanks,&lt;BR /&gt;Kousalya&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Aug 2020 10:44:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4129448#M1756</guid>
      <dc:creator>kmathiya</dc:creator>
      <dc:date>2020-08-03T10:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: YDK-GEN Libyang error seen in generated Cisco-ios-xr packages</title>
      <link>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4129646#M1757</link>
      <description>&lt;P class="lia-align-justify"&gt;The direct compilation and installation of Libyang from master branch is a mistake, because YDK uses fork repository, which was adopted for the YDK needs and is not compatible with the master repository.&lt;/P&gt;&lt;P class="lia-align-justify"&gt;The error that you are getting usually appears when &lt;EM&gt;&lt;STRONG&gt;Libyang&lt;/STRONG&gt;&lt;/EM&gt; library is not properly installed under &lt;EM&gt;&lt;STRONG&gt;/usr/local/lib/&lt;/STRONG&gt;&lt;/EM&gt;. You need to do the following:&lt;/P&gt;&lt;PRE&gt;cd ydk-gen&lt;BR /&gt;cd gen-api/cpp/ydk/build&lt;BR /&gt;sudo make install&lt;BR /&gt;cd -&lt;BR /&gt;# Set your Python virtual environment&lt;BR /&gt;cd gen-api/python/ydk/dist&lt;BR /&gt;pip install -U ydk*.tar.gz&lt;/PRE&gt;&lt;P&gt;Follow the console output to make sure all the steps went with no errors, and &lt;STRONG&gt;all&lt;/STRONG&gt; &lt;EM&gt;&lt;STRONG&gt;libyang&lt;/STRONG&gt;&lt;/EM&gt; components are replaced!! If not, remove them manually from &lt;EM&gt;&lt;STRONG&gt;/usr/local/lib&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;/usr/local/include&lt;/STRONG&gt;&lt;/EM&gt;, then repeat the steps above.&lt;/P&gt;&lt;P&gt;I assume that you are working on RHEL or Centos platform. That requires proper setting of environment variable &lt;EM&gt;&lt;STRONG&gt;LD_LIBRARY_PATH&lt;/STRONG&gt;&lt;/EM&gt;. Make sure it includes path &lt;EM&gt;&lt;STRONG&gt;/usr/local/lib&lt;/STRONG&gt;&lt;/EM&gt;. Then you can go back to your script.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE.&lt;/STRONG&gt; The YDK-0.8.5 generates different bundle code. So you need to regenerate the bundles, which were built with 0.8.4.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 16:31:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-gen-libyang-error-seen-in-generated-cisco-ios-xr-packages/m-p/4129646#M1757</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-08-03T16:31:47Z</dc:date>
    </item>
  </channel>
</rss>

