09-23-2021 04:48 PM
Hi I have a virtiual env with ydk 0.8.5.post2 installed
(rhel7-21.37.14) shreyash@arcee.cisco.com:~$ pip3 list | grep ydk ydk 0.8.5.post2 ydk-models-cisco-ios-xr 7.5.1 ydk-models-cisco-thinxr-install 6.5.1 ydk-models-ietf 0.1.5.post2 ydk-models-openconfig 0.1.6.post1 ydk-service-gnmi 0.4.0.post5
While executing one of my test script, I encounter a following error:
./../../cafykit/lib/topology/connection/ydkconnection.py:271: in read retval = self.crud.read(self.session, model) /auto/cafy/release/21.37.14/rhel7-21.37.14/lib/python3.6/site-packages/ydk/services/crud_service.py:60: in read return _crud_read(provider, read_filter, False, self._crud.read) /auto/cafy/release/21.37.14/rhel7-21.37.14/lib/python3.6/site-packages/ydk/services/crud_service.py:86: in _crud_read top_filters = _get_top_level_entity(filters, provider.get_session().get_root_schema()) /auto/cafy/release/21.37.14/rhel7-21.37.14/lib/python3.6/site-packages/ydk/entity_utils/entity_utils.py:230: in _get_top_level_entity return _datanode_to_entity(data_node) /auto/cafy/release/21.37.14/rhel7-21.37.14/lib/python3.6/site-packages/ydk/entity_utils/entity_utils.py:79: in _datanode_to_entity yang_ns = importlib.import_module('ydk.models.{}._yang_ns'.format(name)) /usr/cisco/packages/python/python-3.6.7/lib/python3.6/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:994: in _gcd_import ??? <frozen importlib._bootstrap>:971: in _find_and_load ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'ydk.models._deviate._yang_ns', import_ = <function _gcd_import at 0x2b657e0beea0> > ??? E ModuleNotFoundError: No module named 'ydk.models._deviate._yang_ns' <frozen importlib._bootstrap>:953: ModuleNotFoundError ===================================================================================== 1 error in 29.22 seconds ====================================================================================== terminate called after throwing an instance of 'pybind11::error_already_set' what(): TypeError: '>=' not supported between instances of 'int' and 'NoneType'
Can someone please help me to understand if this package 'ydk.models._deviate._yang_ns' is expected to be there in 0.8.5
09-23-2021 05:02 PM
(rhel7-21.37.14) shreyash@arcee.cisco.com:~$ pip3 list | grep pybind11 pybind11 2.4.3
09-24-2021 07:57 AM
The package 'ydk.models._deviate' is not a part of YDK 0.8.5. It used to be generated in 0.5.5 for deviations. I guess, you generated bundle for IOS XR 7.5.1 yourself and erroneously included deviation files. I suggest you remove all deviation files from the bundle profile and regenerate the bundle.
09-24-2021 09:52 AM
Hi Yan,
Thank you so much for your prompt response.
Is there a document or wiki that I can follow on how to remove specific files from the bundle profile and regenerate the bundle?
09-24-2021 10:00 AM
Hi Yan,
Actually I think I know what the issue is. Thank you again for the pointer and the quick help.
09-24-2021 11:06 AM
First, you can read the online documentation on how to build a profile and generate bundle. Second, you can follow ydk-gen profile for XR 6.6.3 as an example. Please keep in mind that for your specific test you might choose to include to the bundle only limited number of YANG models, which will significantly simply your work; just copy needed YANG files from repository to some temp directory and run 'pyang *' in that directory to make sure there no errors stating that some files are missing.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide