{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/4385","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/4385/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/4385/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/4385/events","html_url":"https://github.com/StackStorm/st2/issues/4385","id":368777593,"node_id":"MDU6SXNzdWUzNjg3Nzc1OTM=","number":4385,"title":"CLI ERROR: 'unicodeescape' codec can't decode bytes in position 238-239: truncated \\UXXXXXXXX escape","user":{"login":"jeking3","id":11771245,"node_id":"MDQ6VXNlcjExNzcxMjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/11771245?v=4","gravatar_id":"","url":"https://api.github.com/users/jeking3","html_url":"https://github.com/jeking3","followers_url":"https://api.github.com/users/jeking3/followers","following_url":"https://api.github.com/users/jeking3/following{/other_user}","gists_url":"https://api.github.com/users/jeking3/gists{/gist_id}","starred_url":"https://api.github.com/users/jeking3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeking3/subscriptions","organizations_url":"https://api.github.com/users/jeking3/orgs","repos_url":"https://api.github.com/users/jeking3/repos","events_url":"https://api.github.com/users/jeking3/events{/privacy}","received_events_url":"https://api.github.com/users/jeking3/received_events","type":"User","site_admin":false},"labels":[{"id":412096124,"node_id":"MDU6TGFiZWw0MTIwOTYxMjQ=","url":"https://api.github.com/repos/StackStorm/st2/labels/status:need%20more%20info","name":"status:need more info","color":"7b5804","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-10T17:44:44Z","updated_at":"2018-10-11T13:12:03Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\n\r\nRunning a command from the vSphere pack that executes a command on a windows guest and returns a string is successful, and I can see it in the st2 GUI, but the command line response indicates a problem handling the data.\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### STACKSTORM VERSION\r\nst2 3.0dev (5377ebb), on Python 2.7.6\r\n\r\n##### OS / ENVIRONMENT / INSTALL METHOD\r\nst2-docker with ST2_IMAGE_TAG=dev\r\n\r\n##### STEPS TO REPRODUCE\r\nRequires a working vSphere environment.\r\nInstall the vSphere pack with guest extensions from my branch:\r\n```\r\n# st2 pack install https://github.com/jeking3/stackstorm-vsphere.git=guestops\r\n```\r\nRun a command against a guest, for example:\r\n```\r\nroot@b9bab223e4fa:/# st2 run vsphere.guest_dir_create vm_id=vm-45 username=Administrator password=******** prefix=issue_ suffix=_test\r\n.\r\nERROR: 'unicodeescape' codec can't decode bytes in position 238-239: truncated \\UXXXXXXXX escape\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nThe action output in the GUI is reasonable:\r\n```\r\n{\r\n  \"result\": \"C:\\\\Users\\\\ADMINI~1\\\\AppData\\\\Local\\\\Temp\\\\jking_vmware20_test\",\r\n  \"exit_code\": 0,\r\n  \"stderr\": \"/opt/stackstorm/st2/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.\\n  utils.DeprecatedIn23,\\n\",\r\n  \"stdout\": \"\"\r\n}\r\n```\r\nHowever the CLI choked.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nERROR: 'unicodeescape' codec can't decode bytes in position 238-239: truncated \\UXXXXXXXX escape\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/428949608","html_url":"https://github.com/StackStorm/st2/issues/4385#issuecomment-428949608","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/4385","id":428949608,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODk0OTYwOA==","user":{"login":"jeking3","id":11771245,"node_id":"MDQ6VXNlcjExNzcxMjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/11771245?v=4","gravatar_id":"","url":"https://api.github.com/users/jeking3","html_url":"https://github.com/jeking3","followers_url":"https://api.github.com/users/jeking3/followers","following_url":"https://api.github.com/users/jeking3/following{/other_user}","gists_url":"https://api.github.com/users/jeking3/gists{/gist_id}","starred_url":"https://api.github.com/users/jeking3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeking3/subscriptions","organizations_url":"https://api.github.com/users/jeking3/orgs","repos_url":"https://api.github.com/users/jeking3/repos","events_url":"https://api.github.com/users/jeking3/events{/privacy}","received_events_url":"https://api.github.com/users/jeking3/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T13:12:03Z","updated_at":"2018-10-11T13:12:03Z","author_association":"NONE","body":"The tail end with the stack trace is probably what you are looking for.  If you need more let me know.\r\n```\r\nTraceback (most recent call last):\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/shell.py\", line 402, in run\r\n    func(args)\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/resource.py\", line 47, in decorate\r\n    return func(*args, **kwargs)\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py\", line 1229, in run_and_print\r\n    return self._print_execution_details(execution=execution, args=args, **kwargs)\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/action.py\", line 366, in _print_execution_details\r\n    self.print_output(instance, formatter, **options)\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/__init__.py\", line 90, in print_output\r\n    output = self.format_output(subject, formatter, *args, **kwargs)\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/commands/__init__.py\", line 86, in format_output\r\n    return func(subject, *args, **kwargs)\r\n  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2client/formatters/execution.py\", line 122, in format\r\n    return strutil.unescape(str(output)).decode('unicode_escape').encode('utf-8')\r\nUnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 251-252: truncated \\UXXXXXXXX escape\r\n```\r\nI think it has something to do with backslashes.  I like the debug command - thanks. :)"}}
{"actor":{"display_login":"jeking3"}}