<?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: Help needed debugging API compilation errors from ydk-gen in Tools</title>
    <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486430#M2865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error indicates libxslt could be missing. Can you make sure you have installed all the system dependencies as documented here &amp;lt; https://github.com/CiscoDevNet/ydk-py#macos &amp;gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Oct 2017 16:37:50 GMT</pubDate>
    <dc:creator>abhirame</dc:creator>
    <dc:date>2017-10-20T16:37:50Z</dc:date>
    <item>
      <title>Help needed debugging API compilation errors from ydk-gen</title>
      <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486425#M2860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi all,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;After many trials and tribulations I finally managed to install YDK on my Mac, but I haven't yet been able to successfully generate an API with ydk-gen. Depending on the bundle file I use, and which bits I take out of it, I will get different error outputs, but the ultimate outcome is the same in each case. My latest attempt was to work with the bundle from CiscoDevNet on github (&lt;A href="https://raw.githubusercontent.com/CiscoDevNet/ydk-gen/master/profiles/bundles/cisco-ios-xe_16_5_1.json" title="https://raw.githubusercontent.com/CiscoDevNet/ydk-gen/master/profiles/bundles/cisco-ios-xe_16_5_1.json"&gt;https://raw.githubusercontent.com/CiscoDevNet/ydk-gen/master/profiles/bundles/cisco-ios-xe_16_5_1.json&lt;/A&gt;) using this command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;sudo ~/ydk-gen/generate.py --python --bundle ios-xe_16_5_1.json -v&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;Firstly, I get this error, which I think I can ignore because compilations seems to proceed OK (for info, the variable is set anyway):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;YDKGEN_HOME not set. Assuming current directory is working directory.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Information - this is the variable declaration: declare -x YDKGEN_HOME="/Users/stevesmith/ydk-gen/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;So the output from the command continues with a bunch of warnings (mainly about double quotes being unsafe), so all looks promising until it gets to this point:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/generate.py", line 369, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;options.one_class_per_module).generate(options.bundle))&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/__init__.py", line 91, in generate&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;return self._generate_bundle(description_file)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/__init__.py", line 117, in _generate_bundle&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;packages = self._get_packages(curr_bundle.resolved_models_dir)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/__init__.py", line 163, in _get_packages&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;packages = ApiModelBuilder(self.iskeyword, self.language).generate(modules)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 70, in generate&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(package)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 147, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;self._resolve_expanded_cross_references(owned_element)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/builder/_api_model_builder.py", line 131, in _resolve_expanded_cross_references&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;if not hasattr(identity_ref_type.i_type_spec.base.i_identity, 'i_class'):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;AttributeError: 'NoneType' object has no attribute 'i_identity'&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;SPAN class="s1"&gt;I have no idea where to start to debug this. As with all of the other errors that get thrown when I attempt an API build using various forms of bundle file, the error messages don't offer much in the way of helpful hints, so I presume only a developer would be able to get to the bottom of them. &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;A bit more background. The only successful compilation I've managed so far is using a simplified bundle file, with ned.yang explicitly removed from the commits list. I assume an issue with ned, but I haven't found a workaround.&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;Would appreciate any clues on how to move forward!&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P class="p1" style="font-size: 13.3333px;"&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 01:40:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486425#M2860</guid>
      <dc:creator>stevesmith31</dc:creator>
      <dc:date>2017-10-16T01:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed debugging API compilation errors from ydk-gen</title>
      <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486426#M2861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry you are facing this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you’d like to use a pre-generated bundle for XR, you can try using the package already released on PyPi: https://pypi.python.org/pypi/ydk-models-cisco-ios-xe. ‘pip install ydk-models-cisco-ios-xe’ will install all the packages you need. This way you won’t need to use ydk-gen to generate a bundle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fix the issue with ydk-gen you are seeing, it appears you have pyang 1.7 installed. ‘pip list|grep pyang’ will tell you the version. However, ydk-gen requires pyang to be exactly 1.6 as specified in requirements.txt (https://github.com/CiscoDevNet/ydk-gen/blob/master/requirements.txt). So if you try the below, this issue should be fixed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pip uninstall pyang –y&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pip install pyang==1.6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 23:20:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486426#M2861</guid>
      <dc:creator>abhirame</dc:creator>
      <dc:date>2017-10-16T23:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed debugging API compilation errors from ydk-gen</title>
      <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486427#M2862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abhirame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for taking the time to look into this. I greatly appreciate your contribution. On the use of the pre-generated bundle, I actually already have that installed, but I am just trying to work through the steps in the tutorial at networkop.co.uk/blog/2017/02/22/odl-ydk and the step I'm up to is to run ydk-gen to build an API. So I try and do as I'm told:-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did find that pyang 1.7 was installed as you suspected (how did you know that by the way?), so I uninstalled it and tried the install of 1.6, but I was told that requirements was already satisfied (pyang==1.6 in /Library/Python/2.7/site-packages). pip list also confirms pyang (1.6), yet when I run ydk-gen , now I am seeing "no module named yang". Google search for this error didn't reveal much that seemed relevant. Sorry to have to ask again, but can you provide any clues on how to fix this? Or maybe I can skip this step in the tutorial altogether using the pre-generated bundle, but if I try to jump to the next step (from ydk.models.cisco_ios_xe.ned import Native) I get&amp;nbsp; "import error: no module named ned", which I assume is an artefact of my inability to generate the API. But I could be on the wrong track altogether I guess...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thanks. Hope you can assist further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 01:10:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486427#M2862</guid>
      <dc:creator>stevesmith31</dc:creator>
      <dc:date>2017-10-18T01:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed debugging API compilation errors from ydk-gen</title>
      <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486428#M2863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No problem. I had seen the same error you are seeing previously, so I guessed you may have the pyang 1.7 installed. ☺&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would help if you could post the full command line output of these errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the first error, I’m guessing the reason could be there could some issue with the paths to the yang models defined in your .json profile file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second error, with the latest cisco-ios-xe bundle (16.6.1) the name of the python module has actually changed because the &lt;A href="https://github.com/YangModels/yang/tree/master/vendor/cisco/xe/1661"&gt;corresponding yang model&lt;/A&gt;&lt;SPAN&gt;s have changed. The documentation for this is here: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://ydk.cisco.com/py/docs/gen_doc_2d1e68f0c4b51b62e2aa90c4760e6900f62a66af.html" rel="nofollow" target="_blank"&gt;http://ydk.cisco.com/py/docs/gen_doc_2d1e68f0c4b51b62e2aa90c4760e6900f62a66af.html&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you’d need to change the import path to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_15083446104062749 jive_macro_code" jivemacro_uid="_15083446104062749"&gt;
&lt;P&gt;from ydk.models.cisco_ios_xe.Cisco_IOS_XE_native import Native&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 16:33:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486428#M2863</guid>
      <dc:creator>abhirame</dc:creator>
      <dc:date>2017-10-18T16:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed debugging API compilation errors from ydk-gen</title>
      <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486429#M2864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Hi abhirame,&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;Once again thanks for your tips. In the case of the pyang error, I finally figured out that "pip install pyang==1.6" had created the pyang and pyang-1.6.dist-info directories under &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;/private/var/root/Library/Python/2.7/lib/python/site-packages. So I copied these directories to /Library/Python/2.7/site-packages. This fixed the missing dependency issue and I have since been able to compile the API based on the bundle json file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;FYI, the original import error output was:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;steves-MacBook-Air:ydk-gen stevesmith$ sudo ~/ydk-gen/generate.py --python --bundle ios-xe-16-5-bundle.json -v&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/generate.py", line 33, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;from ydkgen import YdkGenerator&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/__init__.py", line 31, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;from .common import YdkGenException, iscppkeyword, ispythonkeyword&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Users/stevesmith/ydk-gen/ydkgen/common.py", line 21, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;from pyang import types as ptypes&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;ImportError: No module named pyang&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p6"&gt;&lt;SPAN class="s1"&gt;So overcoming this problem allows me to move on to the Configuring BGP step in the tutorial, but of course just as you think you’ve cleared the final hurdle you find you’ve landed in a blackberry bush surrounded by an electric fence on the other side. So I move on to solving the next issue:&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p7"&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&amp;gt;&amp;gt;&amp;gt; from ydk.models.cisco_ios_xe.Cisco_IOS_XE_native import Native&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Library/Python/2.7/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 8, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Library/Python/2.7/site-packages/ydk/types/__init__.py", line 17, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;from .py_types import Entity, YList, YLeafList&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "/Library/Python/2.7/site-packages/ydk/types/py_types.py", line 24, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;from ydk_ import is_set&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;ImportError: dlopen(/Library/Python/2.7/site-packages/ydk_.so, 2): Library not loaded: /usr/local/opt/libxslt/lib/libxslt.1.dylib&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Referenced from: /Library/Python/2.7/site-packages/ydk_.so&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Reason: image not found&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&amp;gt;&amp;gt;&amp;gt; import /usr/local/opt/libxslt/lib/libxslt.1.dylib&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;File "&amp;lt;stdin&amp;gt;", line 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;import /usr/local/opt/libxslt/lib/libxslt.1.dylib&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;I’ll beaver away on this one for a while, but if you have any clues, feel free to share!&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;Steve&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 00:00:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486429#M2864</guid>
      <dc:creator>stevesmith31</dc:creator>
      <dc:date>2017-10-20T00:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed debugging API compilation errors from ydk-gen</title>
      <link>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486430#M2865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error indicates libxslt could be missing. Can you make sure you have installed all the system dependencies as documented here &amp;lt; https://github.com/CiscoDevNet/ydk-py#macos &amp;gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 16:37:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/help-needed-debugging-api-compilation-errors-from-ydk-gen/m-p/3486430#M2865</guid>
      <dc:creator>abhirame</dc:creator>
      <dc:date>2017-10-20T16:37:50Z</dc:date>
    </item>
  </channel>
</rss>

