{"action":"created","issue":{"url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/issues/674","repository_url":"https://api.github.com/repos/CiscoDevNet/ydk-gen","labels_url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/issues/674/labels{/name}","comments_url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/issues/674/comments","events_url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/issues/674/events","html_url":"https://github.com/CiscoDevNet/ydk-gen/issues/674","id":292992970,"number":674,"title":"UnicodeDecodeError while testing NX OS derived Yang model","user":{"login":"ygorelik","id":34285093,"avatar_url":"https://avatars3.githubusercontent.com/u/34285093?v=4","gravatar_id":"","url":"https://api.github.com/users/ygorelik","html_url":"https://github.com/ygorelik","followers_url":"https://api.github.com/users/ygorelik/followers","following_url":"https://api.github.com/users/ygorelik/following{/other_user}","gists_url":"https://api.github.com/users/ygorelik/gists{/gist_id}","starred_url":"https://api.github.com/users/ygorelik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygorelik/subscriptions","organizations_url":"https://api.github.com/users/ygorelik/orgs","repos_url":"https://api.github.com/users/ygorelik/repos","events_url":"https://api.github.com/users/ygorelik/events{/privacy}","received_events_url":"https://api.github.com/users/ygorelik/received_events","type":"User","site_admin":false},"labels":[{"id":340069848,"url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-31T00:51:43Z","updated_at":"2018-02-23T18:02:31Z","closed_at":null,"author_association":"COLLABORATOR","body":"Issue tracker is ONLY used for reporting bugs. Please use the [YDK Community](https://communities.cisco.com/community/developer/ydk) for any support issues.\r\n\r\n## Current Behavior\r\nWhile running codec tests of NX OS derived model ydktest-sanity-typedefs.yang in Python we get error originated in pybind11:\r\nUnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 31: invalid start byte\r\n\r\n## Steps to Reproduce\r\n\r\nAdd the following test to the test_sanity_codec.py and run the test.\r\n```python\r\n   def test_encode_decode_typedefs(self):\r\n        from ydk.models.ydktest import ydktest_sanity_typedefs as ysanity_typedefs\r\n        system_encode = ysanity_typedefs.System()\r\n        system_encode.mode = ysanity_typedefs.TopMode.stand_alone\r\n        system_encode.id = 22;\r\n        \r\n        #self.provider.encoding = EncodingFormat.XML\r\n        payload = self.codec.encode(self.provider, system_encode)\r\n        \r\n        system_decode = self.codec.decode(self.provider, payload)\r\n        self.assertEqual(system_encode, system_decode)\r\n```\r\n## Logs\r\n\r\n```\r\nwarning: Debugger speedups using cython not found. Run '\"/usr/bin/python\" \"/home/yan/.p2/pool/plugins/org.python.pydev_6.2.0.201711281614/pysrc/setup_cython.py\" build_ext --inplace' to build.\r\npydev debugger: starting (pid: 23670)\r\ntest_encode_decode_typedefs (__main__.SanityYang) ... ERROR\r\n\r\n======================================================================\r\nERROR: test_encode_decode_typedefs (__main__.SanityYang)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/yan/ydk-workspace/ydk-gen/sdk/python/core/tests/test_sanity_codec.py\", line 367, in test_encode_decode_typedefs\r\n    payload = self.codec.encode(self.provider, system_encode)\r\n  File \"/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py\", line 112, in helper\r\n    return func(self, provider, entity, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/ydk/services/codec_service.py\", line 74, in encode\r\n    return self._encode(provider, entity_holder, pretty, subtree)\r\n  File \"/usr/local/lib/python2.7/dist-packages/ydk/services/codec_service.py\", line 101, in _encode\r\n    data_node = _get_data_node_from_entity(entity, root_schema)\r\nUnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 31: invalid start byte\r\n\r\n----------------------------------------------------------------------\r\nRan 1 test in 97.052s\r\n\r\nFAILED (errors=1)\r\n```\r\n\r\n## System Information\r\n<!-- Please include python version, operating system and processor architecture -->\r\nTested in Ubuntu 14.1"},"comment":{"url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/issues/comments/368089869","html_url":"https://github.com/CiscoDevNet/ydk-gen/issues/674#issuecomment-368089869","issue_url":"https://api.github.com/repos/CiscoDevNet/ydk-gen/issues/674","id":368089869,"user":{"login":"ygorelik","id":34285093,"avatar_url":"https://avatars3.githubusercontent.com/u/34285093?v=4","gravatar_id":"","url":"https://api.github.com/users/ygorelik","html_url":"https://github.com/ygorelik","followers_url":"https://api.github.com/users/ygorelik/followers","following_url":"https://api.github.com/users/ygorelik/following{/other_user}","gists_url":"https://api.github.com/users/ygorelik/gists{/gist_id}","starred_url":"https://api.github.com/users/ygorelik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ygorelik/subscriptions","organizations_url":"https://api.github.com/users/ygorelik/orgs","repos_url":"https://api.github.com/users/ygorelik/repos","events_url":"https://api.github.com/users/ygorelik/events{/privacy}","received_events_url":"https://api.github.com/users/ygorelik/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T18:02:31Z","updated_at":"2018-02-23T18:02:31Z","author_association":"COLLABORATOR","body":"Tested YDK after applying libyang fix (merged with version 0.14.70). All worked as expected. \r\n\r\nSee logs and test script for details: \r\n[test_674.zip](https://github.com/CiscoDevNet/ydk-gen/files/1752652/test_674.zip)\r\n"}}
{"actor":{"display_login":"ygorelik"}}