Python "RemoteError: Remote error: UnicodeEncodeError 'ascii' codec can't encode ch

liangzebin 发布于 2017/08/03 14:31
阅读 153
收藏 0

【DevOps必读】产品经理与程序员之间如何破局?>>>

{
  "traceback": "  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/st2actions/container/base.py\", line 99, in _do_run\n    LOG.debug('Performing run for runner: %s' % (runner.runner_id), extra=extra)\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 49, in wrapped_f\n    def wrapped_f(*args, **kw):\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 206, in call\n    if not self.should_reject(attempt):\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 247, in get\n    else:\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 200, in call\n    try:\n  File \"/opt/stackstorm/runners/mistral_v2/mistral_v2.py\", line 219, in run\n    result = self.start(action_parameters=action_parameters)\n  File \"/opt/stackstorm/runners/mistral_v2/mistral_v2.py\", line 256, in start\n    **options)\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/mistralclient/api/v2/executions.py\", line 56, in create\n    return self._create('/executions', data)\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/mistralclient/api/base.py\", line 95, in _create\n    self._raise_api_exception(resp)\n  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/mistralclient/api/base.py\", line 143, in _raise_api_exception\n    error_message=error_data)\n",
  
  
  "error": "RemoteError: Remote error: UnicodeEncodeError 'ascii' codec can't encode character u'\\xae' in position 169: ordinal not in range(128)\n[u'Traceback (most recent call last):\\n', u'  File \"/opt/stackstorm/mistral/lib/python2.7/site-packages/oslo_messaging/rpc/server.py\", line 155, in _process_incoming\\n    failure = None\\n', u'  File \"/opt/stackstorm/mistral/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py\", line 222, in dispatch\\n    if hasattr(endpoint, method):\\n', u'  File \"/opt/stackstorm/mistral/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py\", line 192, in _do_dispatch\\n    new_args[argname] = self.serializer.deserialize_entity(ctxt, arg)\\n', u'  File \"/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/engine/engine_server.py\", line 98, in start_workflow\\n    (rpc_ctx, workflow_identifier, utils.cut(workflow_input),\\n', u'  File \"/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/utils/__init__.py\", line 284, in cut\\n    return cut_dict(data, length=length)\\n', u'  File \"/opt/stackstorm/mistral/lib/python2.7/site-packages/mistral/utils/__init__.py\", line 198, in cut_dict\\n    v = str(value)\\n', u\"UnicodeEncodeError: 'ascii' codec can't encode character u'\\\\xae' in position 169: ordinal not in range(128)\\n\"]."
}

加载中
0
l
liangzebin
# encoding=utf8
import  sys
reload(sys)
sys.setdefaultencoding("utf8")

尝试了以上的方式,仍然无效。

返回顶部
顶部