<?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 running attached Python YDK script  with IOS XE 16121 YANG Model in Tools</title>
    <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086475#M1882</link>
    <description>&lt;P&gt;Update: I got the fix but still ran in to same issue. I have also attched the full set of files that I used to test along with host vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I cloned the git repo&amp;nbsp;&lt;A href="https://github.com/ygorelik/ydk-gen" target="_blank"&gt;https://github.com/ygorelik/ydk-gen&lt;/A&gt;&amp;nbsp;to my VM&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;cd ydk-gen&lt;BR /&gt;./generate.py --libydk -is&lt;BR /&gt;./generate.py --core -is&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;./generate.py --python --bundle profiles/bundles/&amp;lt;name-of-profile&amp;gt;.json&lt;/P&gt;
&lt;P&gt;4. Launched Python Virtual environment with python 3.6&lt;/P&gt;
&lt;P&gt;5. sudo pip install gen-api/python/cisco_ios_xe-bundle/dist/ydk*.tar.gz&lt;/P&gt;
&lt;P&gt;6. ran the python script I attached earlier.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still got same issue as before.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "ydk_config_gen_vlan.py", line 115, in &amp;lt;module&amp;gt;&lt;BR /&gt;native = xe_native.Native()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1330, in __init__&lt;BR /&gt;self.aaa = Native.Aaa()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1699078, in __init__&lt;BR /&gt;self.accounting = Native.Aaa.Accounting()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1707590, in __init__&lt;BR /&gt;self.onep = Native.Aaa.Accounting.Onep()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709446, in __init__&lt;BR /&gt;self.default = Native.Aaa.Accounting.Onep.Default()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709505, in __init__&lt;BR /&gt;self.start_stop = Native.Aaa.Accounting.Onep.Default.StartStop()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709582, in __init__&lt;BR /&gt;self.logger = None&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709604, in __setattr__&lt;BR /&gt;self._perform_setattr(Native.Aaa.Accounting.Onep.Default.StartStop, [u'broadcast', u'logger'], name, value)&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 390, in _perform_setattr&lt;BR /&gt;_validate_value(self._leafs[name], name, value, self.logger)&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 847, in _validate_value&lt;BR /&gt;raise _YModelError(err_msg)&lt;BR /&gt;ydk.errors.YModelError: Invalid value None for 'logger'. Got type: 'NoneType'. Expected types: 'Empty'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to build and run against YDK model with python for ISO XE 16121 . I was successfull in building and installing the API models .But when I try running the&amp;nbsp; a python script&amp;nbsp; I used&amp;nbsp; in to issues. See error log below.&amp;nbsp;&amp;nbsp;Note that I tried with both Python 2.7 and 3.6 as well and&amp;nbsp; got same issue . Any help is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my Bundle details. I built the bundle with 16121 Yang models&lt;/P&gt;
&lt;P&gt;ydk 0.8.4&lt;BR /&gt;ydk-models-cisco-ios-xe 16.12.1&lt;BR /&gt;ydk-models-ietf 0.1.5.post2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "ydk_config_gen_vlan.py", line 115, in &amp;lt;module&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; native = xe_native.Native()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1328, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.aaa = Native.Aaa()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1699076, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.accounting = Native.Aaa.Accounting()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1707588, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.onep = Native.Aaa.Accounting.Onep()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709444, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.default = Native.Aaa.Accounting.Onep.Default()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709503, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.start_stop = Native.Aaa.Accounting.Onep.Default.StartStop()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709580, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.logger = None&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709602, in __setattr__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self._perform_setattr(Native.Aaa.Accounting.Onep.Default.StartStop, [u'broadcast', u'logger'], name, value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 390, in _perform_setattr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _validate_value(self._leafs[name], name, value, self.logger)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 847, in _validate_value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise _YModelError(err_msg)&lt;/P&gt;
&lt;P&gt;ydk.errors.YModelError: Invalid value None for 'logger'. Got type: 'NoneType'. Expected types: 'Empty'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2020 10:05:23 GMT</pubDate>
    <dc:creator>arsakthi</dc:creator>
    <dc:date>2020-05-18T10:05:23Z</dc:date>
    <item>
      <title>Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086475#M1882</link>
      <description>&lt;P&gt;Update: I got the fix but still ran in to same issue. I have also attched the full set of files that I used to test along with host vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I cloned the git repo&amp;nbsp;&lt;A href="https://github.com/ygorelik/ydk-gen" target="_blank"&gt;https://github.com/ygorelik/ydk-gen&lt;/A&gt;&amp;nbsp;to my VM&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;cd ydk-gen&lt;BR /&gt;./generate.py --libydk -is&lt;BR /&gt;./generate.py --core -is&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;./generate.py --python --bundle profiles/bundles/&amp;lt;name-of-profile&amp;gt;.json&lt;/P&gt;
&lt;P&gt;4. Launched Python Virtual environment with python 3.6&lt;/P&gt;
&lt;P&gt;5. sudo pip install gen-api/python/cisco_ios_xe-bundle/dist/ydk*.tar.gz&lt;/P&gt;
&lt;P&gt;6. ran the python script I attached earlier.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still got same issue as before.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "ydk_config_gen_vlan.py", line 115, in &amp;lt;module&amp;gt;&lt;BR /&gt;native = xe_native.Native()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1330, in __init__&lt;BR /&gt;self.aaa = Native.Aaa()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1699078, in __init__&lt;BR /&gt;self.accounting = Native.Aaa.Accounting()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1707590, in __init__&lt;BR /&gt;self.onep = Native.Aaa.Accounting.Onep()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709446, in __init__&lt;BR /&gt;self.default = Native.Aaa.Accounting.Onep.Default()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709505, in __init__&lt;BR /&gt;self.start_stop = Native.Aaa.Accounting.Onep.Default.StartStop()&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709582, in __init__&lt;BR /&gt;self.logger = None&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709604, in __setattr__&lt;BR /&gt;self._perform_setattr(Native.Aaa.Accounting.Onep.Default.StartStop, [u'broadcast', u'logger'], name, value)&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 390, in _perform_setattr&lt;BR /&gt;_validate_value(self._leafs[name], name, value, self.logger)&lt;BR /&gt;File "/home/vagrant/ydk-gen/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 847, in _validate_value&lt;BR /&gt;raise _YModelError(err_msg)&lt;BR /&gt;ydk.errors.YModelError: Invalid value None for 'logger'. Got type: 'NoneType'. Expected types: 'Empty'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to build and run against YDK model with python for ISO XE 16121 . I was successfull in building and installing the API models .But when I try running the&amp;nbsp; a python script&amp;nbsp; I used&amp;nbsp; in to issues. See error log below.&amp;nbsp;&amp;nbsp;Note that I tried with both Python 2.7 and 3.6 as well and&amp;nbsp; got same issue . Any help is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my Bundle details. I built the bundle with 16121 Yang models&lt;/P&gt;
&lt;P&gt;ydk 0.8.4&lt;BR /&gt;ydk-models-cisco-ios-xe 16.12.1&lt;BR /&gt;ydk-models-ietf 0.1.5.post2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "ydk_config_gen_vlan.py", line 115, in &amp;lt;module&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; native = xe_native.Native()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1328, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.aaa = Native.Aaa()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1699076, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.accounting = Native.Aaa.Accounting()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1707588, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.onep = Native.Aaa.Accounting.Onep()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709444, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.default = Native.Aaa.Accounting.Onep.Default()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709503, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.start_stop = Native.Aaa.Accounting.Onep.Default.StartStop()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709580, in __init__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.logger = None&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/models/cisco_ios_xe/Cisco_IOS_XE_native.py", line 1709602, in __setattr__&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self._perform_setattr(Native.Aaa.Accounting.Onep.Default.StartStop, [u'broadcast', u'logger'], name, value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 390, in _perform_setattr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _validate_value(self._leafs[name], name, value, self.logger)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/home/vagrant/venv/lib/python3.6/site-packages/ydk/types/py_types.py", line 847, in _validate_value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise _YModelError(err_msg)&lt;/P&gt;
&lt;P&gt;ydk.errors.YModelError: Invalid value None for 'logger'. Got type: 'NoneType'. Expected types: 'Empty'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 10:05:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086475#M1882</guid>
      <dc:creator>arsakthi</dc:creator>
      <dc:date>2020-05-18T10:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086813#M1883</link>
      <description>&lt;P&gt;Here are the bundle version, I built the bundle with 16121&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ydk 0.8.4&lt;BR /&gt;ydk-models-cisco-ios-xe 16.12.1&lt;BR /&gt;ydk-models-ietf 0.1.5.post2&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 18:52:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086813#M1883</guid>
      <dc:creator>arsakthi</dc:creator>
      <dc:date>2020-05-15T18:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086930#M1884</link>
      <description>&lt;P&gt;I am trying to build bundle for IOS XE 16.12.1 using &lt;A href="https://github.com/YangModels/yang/tree/master/vendor/cisco/xe/16121" target="_self"&gt;published&lt;/A&gt; YANG models, but getting errors in&amp;nbsp;&lt;EM&gt;Cisco-IOS-XE-bgp.yang&lt;/EM&gt;. In this regards could you please share correct model and bundle profile.&lt;/P&gt;&lt;P&gt;Also, could you please share &lt;EM&gt;*.yaml&lt;/EM&gt; files needed to run your script.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 22:35:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4086930#M1884</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-05-15T22:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4087142#M1885</link>
      <description>&lt;P&gt;Hi arsakthi&lt;/P&gt;&lt;P&gt;After in depth investigation I realized that this is a bug in python core package. I have opened GitHub issue &lt;A href="https://github.com/CiscoDevNet/ydk-gen/issues/996" target="_self"&gt;#996&lt;/A&gt; and then resolved it. The solution is part of YDK new release, which I am working on currently. It is located in my private &lt;A href="https://github.com/ygorelik/ydk-gen" target="_self"&gt;fork&lt;/A&gt;. If this is critical for your work, I suggest to do the following after &lt;A href="https://github.com/CiscoDevNet/ydk-gen#system-requirements" target="_self"&gt;system requirements&lt;/A&gt; are met:&lt;/P&gt;&lt;PRE&gt;git clone https://github.com/ygorelik/ydk-gen.git -b 0.8.4.post1&lt;BR /&gt;cd ydk-gen&lt;BR /&gt;./generate.py --libydk -is&lt;BR /&gt;# switch to your Python virtual environment then install Python core package&lt;BR /&gt;./generate.py --core -i&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 16:51:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4087142#M1885</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-05-18T16:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4088080#M1886</link>
      <description>&lt;P&gt;Hi&amp;nbsp;arsakthi&lt;/P&gt;&lt;P&gt;Based on your description, you have installed python core package and model bundle in Python2 system location. (I should be more precise in describing procedure, just wanted to make it look simple). Therefore you did not pickup the fixed code.&lt;/P&gt;&lt;P&gt;If you use python virtual environment, then you should switch to it BEFORE installing python core and bundle packages. Also, you should not use '-s' (or --sudo) option when installing in virtual environment. The procedure should look like this:&lt;/P&gt;&lt;PRE&gt;# 1. Clone the git repository&amp;nbsp;to your working space:&lt;BR /&gt;git clone https://github.com/ygorelik/ydk-gen.git -b 0.8.4.post1&lt;BR /&gt;cd ydk-gen&lt;BR /&gt;&lt;BR /&gt;# 2. Generate and install libydk library (needs sudo access):&lt;BR /&gt;./generate.py --libydk -is&lt;BR /&gt;&lt;BR /&gt;# 3. Switch to Python virtual environment, then generate and install YDK Python core package:&lt;BR /&gt;source /your-venv-location/bin/activate&lt;BR /&gt;./generate.py --core -i&lt;BR /&gt;&lt;BR /&gt;# 4.&amp;nbsp;Generate and install Model API bundle package:&lt;BR /&gt;./generate.py --bundle profiles/bundles/&amp;lt;name-of-profile&amp;gt;.json -i&lt;BR /&gt;&lt;BR /&gt;# 5. Run the python script.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 17:21:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4088080#M1886</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-05-18T17:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4088183#M1887</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;Thanks for the steps.&lt;/P&gt;
&lt;P&gt;I am now able to get past the logger issue and ran in to a new issue. See trace below.&lt;/P&gt;
&lt;P&gt;i have attached the script and env files in the original thread .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "ydk_config_gen_vlan.py", line 127, in &amp;lt;module&amp;gt;&lt;BR /&gt;locals()[model_function](native, config_models_cs[model])&lt;BR /&gt;File "ydk_config_gen_vlan.py", line 74, in config_layer2_global_sw_int_model&lt;BR /&gt;intf.device_tracking.attach_policy = input_intf["device_tracking_policy"]&lt;BR /&gt;AttributeError: 'NoneType' object has no attribute 'attach_policy'&lt;BR /&gt;(newenv) vagrant@devbox:~/ydk-gen_/ydk_config_vlan$&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 19:18:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4088183#M1887</guid>
      <dc:creator>arsakthi</dc:creator>
      <dc:date>2020-05-18T19:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error running attached Python YDK script  with IOS XE 16121 YANG Model</title>
      <link>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4088773#M1888</link>
      <description>&lt;P&gt;This does not look like YDK or Model API issue. I suggest put your script into debugger.&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 16:22:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/error-running-attached-python-ydk-script-with-ios-xe-16121-yang/m-p/4088773#M1888</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-05-19T16:22:51Z</dc:date>
    </item>
  </channel>
</rss>

