-
-
Notifications
You must be signed in to change notification settings - Fork 777
Description
SUMMARY
The ST2 API does not return results when viewing a rule with a UTF-8 character in the name.
I suspect that this will also happen with action names, alias names, and pack names.
STACKSTORM VERSION
st2 3.4.1, on Python 3.6.13
This was during the 3.4.1 release.
OS, environment, install method
Ubuntu 16.04, st2vagrant
Steps to reproduce the problem
Show how to reproduce the problem, using a minimal test-case. Make sure to include any content
(pack content - workflows, actions, etc.) which are needed to reproduce the problem.
- Create a rule in the web UI with a utf-8 character in its name. I used
test_rule_utf8_náme. Creating the rule should work just fine. - Once you create the rule, the web UI will switch back to the rule list and flash up a notification in the lower left that creating the rule was successful. It will also try to GET the rule that was just created. This request will fail with an HTTP 404 and flash up a notification that it was unable to get the rule.
- Trying to get this rule on the command list does not work either.
Expected Results
What did you expect to happen when running the steps above?
Creating a rule with a utf-8 character in its name should work (it currently does).
Viewing a rule with a utf-8 character in its name should work (it currently does not).
Actual Results
What happened? What output did you get?
Getting the rule via CLI does not work:
vagrant@st2vagrant:~$ st2 rule get default.test_rule_utf8_náme
Rule "default.test_rule_utf8_náme" is not found.
Note that listing rules returns the rule with the correct name:
vagrant@st2vagrant:~$ st2 rule list
+-----------------------------------------+----------+-----------------------------------------------------------------------------+---------+
| ref | pack | description | enabled |
+-----------------------------------------+----------+-----------------------------------------------------------------------------+---------+
| chatops.notify | chatops | Notification rule to send results of action executions to stream for | True |
| | | chatops | |
| chatops.notify-errbot | chatops | Notification rule to send results of action executions to stream for | True |
| | | errbot. | |
| default.test_rule_utf8_náme | default | asdf | True |
| examples.notify_inquiry | examples | Notify relevant users of an Inquiry action | False |
| examples.notify_slack | examples | Sample rule firing on action completion. | True |
| examples.sample_rule_file_watch | examples | Sample rule custom trigger type - add a file to be watched by | True |
| | | file_watch_sensor in linux pack. | |
| examples.sample_rule_with_actiontrigger | examples | Sample rule firing on action completion. | True |
| examples.sample_rule_with_timer | examples | Sample rule using an Interval Timer. | False |
| fixtures.tests.interval_timer | fixtures | Test rule using an Interval Timer. | False |
+-----------------------------------------+----------+-----------------------------------------------------------------------------+---------+
The log formatting for logging exceptions is a little messed up, so I tweaked it to make the exception traceback a little bit more readable:
Reformatted log
2021-03-13 07:15:42,225 140260273373864 INFO logging [-] 0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef - GET /v1/rules/views/default.test_rule_utf8_n%C3%A1me with query={} (method='GET',path='/v1/rules/views/default.test_rule_utf8_n%C3%A1me',remote_addr='127.0.0.1',query={},request_id='0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef')
2021-03-13 07:15:42,228 140260277417984 ERROR handlers [-] --- Logging error --- Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 177: ordinal not in range(128)
Call stack: File "/opt/stackstorm/st2/lib/python3.6/site-packages/eventlet/greenthread.py", line 221, in main
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 119, in handle
super(EventletWorker, self).handle(listener, client, addr)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 107, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 121, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/request_id.py", line 51, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 149, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/logging.py", line 79, in __call__
values, extra=values)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
Message: "69e44ae1-1276-4576-8a49-9de4d70e1564 - GET /v1/ruleenforcements/views with query={'rule_ref': ['default.test_rule_utf8_nme'], 'limit': ['10']}"
Arguments: ()--- Logging error --- Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 523, in _get_one
include_fields=include_fields)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 596, in _get_by_ref_or_id
raise StackStormDBObjectNotFoundError(msg)
st2common.exceptions.db.StackStormDBObjectNotFoundError: Resource with a reference or id "default.test_rule_utf8_nme" not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 116-117: ordinal not in range(128)
Call stack: File "/opt/stackstorm/st2/lib/python3.6/site-packages/eventlet/greenthread.py", line 221, in main
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 119, in handle
super(EventletWorker, self).handle(listener, client, addr)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 107, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 69, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/request_id.py", line 51, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 149, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/logging.py", line 91, in __call__
retval = self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/cors.py", line 90, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/error_handling.py", line 49, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/streaming.py", line 48, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 599, in as_wsgi
resp = self(req)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 516, in __call__
resp = func(**kw)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/v1/rule_views.py", line 105, in get_one
requester_user=requester_user, from_model_kwargs=from_model_kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 525, in _get_one
LOG.exception(six.text_type(e))
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.6/logging/__init__.py", line 1343, in exception
self.error(msg, *args, exc_info=exc_info, **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
Message: 'Resource with a reference or id "default.test_rule_utf8_nme" not found'
Arguments: ()--- Logging error --- Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 523, in _get_one
include_fields=include_fields)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 596, in _get_by_ref_or_id
raise StackStormDBObjectNotFoundError(msg)
st2common.exceptions.db.StackStormDBObjectNotFoundError: Resource with a reference or id "default.test_rule_utf8_nme" not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 516, in __call__
resp = func(**kw)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/v1/rule_views.py", line 105, in get_one
requester_user=requester_user, from_model_kwargs=from_model_kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 526, in _get_one
abort(http_client.NOT_FOUND, six.text_type(e))
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 79, in abort
raise exc.status_map[status_code](message)
webob.exc.HTTPNotFound: Resource with a reference or id "default.test_rule_utf8_nme" not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 238-239: ordinal not in range(128)
Call stack: File "/opt/stackstorm/st2/lib/python3.6/site-packages/eventlet/greenthread.py", line 221, in main
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 119, in handle
super(EventletWorker, self).handle(listener, client, addr)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 107, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 69, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/request_id.py", line 51, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 149, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/logging.py", line 91, in __call__
retval = self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/cors.py", line 90, in __call__
return self.app(environ, custom_start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/error_handling.py", line 49, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/streaming.py", line 48, in __call__
return self.app(environ, start_response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 599, in as_wsgi
resp = self(req)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 523, in __call__
(func.__name__, endpoint['operationId'], six.text_type(e)))
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.6/logging/__init__.py", line 1343, in exception
self.error(msg, *args, exc_info=exc_info, **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
Message: 'Failed to call controller function "get_one" for operation "st2api.controllers.v1.rule_views:rule_view_controller.get_one": Resource with a reference or id "default.test_rule_utf8_nme" not found'
Arguments: ()6a8478-e6a5-42ca-b3cf-c7efc0c724ef - 404 109 43.653ms (method='GET',path='/v1/rules/views/default.test_rule_utf8_n%C3%A1me',remote_addr='127.0.0.1',status=404,runtime=43.653,content_length=109,request_id='0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef')
e44ae1-1276-4576-8a49-9de4d70e1564 - 200 3820 53.23ms (method='GET',path='/v1/ruleenforcements/views',remote_addr='127.0.0.1',status=200,runtime=53.23,content_length=3820,request_id='69e44ae1-1276-4576-8a49-9de4d70e1564')
Full log
2021-03-13 07:15:42,225 140260273373864 INFO logging [-] 0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef - GET /v1/rules/views/default.test_rule_utf8_n%C3%A1me with query={} (method='GET',path='/v1/rules/views/default.test_rule_utf8_n%C3%A1me',remote_addr='127.0.0.1',query={},request_id='0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef')
2021-03-13 07:15:42,228 140260277417984 ERROR handlers [-] --- Logging error ---
2021-03-13 07:15:42,228 140260277417984 ERROR traceback [-] Traceback (most recent call last):
2021-03-13 07:15:42,228 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,229 140260277417984 ERROR traceback [-] File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
2021-03-13 07:15:42,229 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,229 140260277417984 ERROR traceback [-] UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 177: ordinal not in range(128)
2021-03-13 07:15:42,229 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,229 140260277417984 ERROR handlers [-] Call stack:
2021-03-13 07:15:42,229 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/eventlet/greenthread.py", line 221, in main
result = function(*args, **kwargs)
2021-03-13 07:15:42,229 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,230 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 119, in handle
super(EventletWorker, self).handle(listener, client, addr)
2021-03-13 07:15:42,230 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,230 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
2021-03-13 07:15:42,230 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,230 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 107, in handle_request
respiter = self.wsgi(environ, resp.start_response)
2021-03-13 07:15:42,230 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,231 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 121, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,231 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,231 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/request_id.py", line 51, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,231 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,232 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 149, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,232 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,232 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/logging.py", line 79, in __call__
values, extra=values)
2021-03-13 07:15:42,233 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,233 140260277417984 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
2021-03-13 07:15:42,233 140260277417984 ERROR traceback [-]
2021-03-13 07:15:42,233 140260277417984 ERROR handlers [-] Message: "69e44ae1-1276-4576-8a49-9de4d70e1564 - GET /v1/ruleenforcements/views with query={'rule_ref': ['default.test_rule_utf8_nme'], 'limit': ['10']}"
Arguments: ()
2021-03-13 07:15:42,239 140260273373864 ERROR handlers [-] --- Logging error ---
2021-03-13 07:15:42,240 140260273373864 ERROR traceback [-] Traceback (most recent call last):
2021-03-13 07:15:42,240 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,241 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 523, in _get_one
include_fields=include_fields)
2021-03-13 07:15:42,241 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,241 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 596, in _get_by_ref_or_id
raise StackStormDBObjectNotFoundError(msg)
2021-03-13 07:15:42,241 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,241 140260273373864 ERROR traceback [-] st2common.exceptions.db.StackStormDBObjectNotFoundError: Resource with a reference or id "default.test_rule_utf8_nme" not found
2021-03-13 07:15:42,242 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,242 140260273373864 ERROR traceback [-]
During handling of the above exception, another exception occurred:
2021-03-13 07:15:42,242 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,243 140260273373864 ERROR traceback [-] Traceback (most recent call last):
2021-03-13 07:15:42,243 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,243 140260273373864 ERROR traceback [-] File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
2021-03-13 07:15:42,243 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,244 140260273373864 ERROR traceback [-] UnicodeEncodeError: 'ascii' codec can't encode characters in position 116-117: ordinal not in range(128)
2021-03-13 07:15:42,244 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,244 140260273373864 ERROR handlers [-] Call stack:
2021-03-13 07:15:42,245 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/eventlet/greenthread.py", line 221, in main
result = function(*args, **kwargs)
2021-03-13 07:15:42,245 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,245 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 119, in handle
super(EventletWorker, self).handle(listener, client, addr)
2021-03-13 07:15:42,245 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,245 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
2021-03-13 07:15:42,246 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,246 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 107, in handle_request
respiter = self.wsgi(environ, resp.start_response)
2021-03-13 07:15:42,247 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,247 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 69, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,247 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,247 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/request_id.py", line 51, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,248 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,248 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 149, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,248 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,248 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/logging.py", line 91, in __call__
retval = self.app(environ, custom_start_response)
2021-03-13 07:15:42,248 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,249 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/cors.py", line 90, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,249 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,249 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/error_handling.py", line 49, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,249 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,249 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/streaming.py", line 48, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,250 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,250 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 599, in as_wsgi
resp = self(req)
2021-03-13 07:15:42,250 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,250 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 516, in __call__
resp = func(**kw)
2021-03-13 07:15:42,250 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,251 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/v1/rule_views.py", line 105, in get_one
requester_user=requester_user, from_model_kwargs=from_model_kwargs)
2021-03-13 07:15:42,251 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,251 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 525, in _get_one
LOG.exception(six.text_type(e))
2021-03-13 07:15:42,251 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,251 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
2021-03-13 07:15:42,252 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,252 140260273373864 ERROR traceback [-] File "/usr/lib/python3.6/logging/__init__.py", line 1343, in exception
self.error(msg, *args, exc_info=exc_info, **kwargs)
2021-03-13 07:15:42,252 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,252 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
2021-03-13 07:15:42,252 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,252 140260273373864 ERROR handlers [-] Message: 'Resource with a reference or id "default.test_rule_utf8_nme" not found'
Arguments: ()
2021-03-13 07:15:42,253 140260273373864 ERROR handlers [-] --- Logging error ---
2021-03-13 07:15:42,253 140260273373864 ERROR traceback [-] Traceback (most recent call last):
2021-03-13 07:15:42,253 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,253 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 523, in _get_one
include_fields=include_fields)
2021-03-13 07:15:42,254 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,254 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 596, in _get_by_ref_or_id
raise StackStormDBObjectNotFoundError(msg)
2021-03-13 07:15:42,254 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,254 140260273373864 ERROR traceback [-] st2common.exceptions.db.StackStormDBObjectNotFoundError: Resource with a reference or id "default.test_rule_utf8_nme" not found
2021-03-13 07:15:42,254 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,255 140260273373864 ERROR traceback [-]
During handling of the above exception, another exception occurred:
2021-03-13 07:15:42,255 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,255 140260273373864 ERROR traceback [-] Traceback (most recent call last):
2021-03-13 07:15:42,255 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,255 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 516, in __call__
resp = func(**kw)
2021-03-13 07:15:42,255 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,256 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/v1/rule_views.py", line 105, in get_one
requester_user=requester_user, from_model_kwargs=from_model_kwargs)
2021-03-13 07:15:42,256 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,256 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2api/controllers/resource.py", line 526, in _get_one
abort(http_client.NOT_FOUND, six.text_type(e))
2021-03-13 07:15:42,256 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,256 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 79, in abort
raise exc.status_map[status_code](message)
2021-03-13 07:15:42,257 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,257 140260273373864 ERROR traceback [-] webob.exc.HTTPNotFound: Resource with a reference or id "default.test_rule_utf8_nme" not found
2021-03-13 07:15:42,257 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,258 140260273373864 ERROR traceback [-]
During handling of the above exception, another exception occurred:
2021-03-13 07:15:42,258 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,258 140260273373864 ERROR traceback [-] Traceback (most recent call last):
2021-03-13 07:15:42,258 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,259 140260273373864 ERROR traceback [-] File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
stream.write(msg)
2021-03-13 07:15:42,259 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,259 140260273373864 ERROR traceback [-] UnicodeEncodeError: 'ascii' codec can't encode characters in position 238-239: ordinal not in range(128)
2021-03-13 07:15:42,259 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,259 140260273373864 ERROR handlers [-] Call stack:
2021-03-13 07:15:42,260 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/eventlet/greenthread.py", line 221, in main
result = function(*args, **kwargs)
2021-03-13 07:15:42,260 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,260 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 119, in handle
super(EventletWorker, self).handle(listener, client, addr)
2021-03-13 07:15:42,260 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,260 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
2021-03-13 07:15:42,261 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,261 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 107, in handle_request
respiter = self.wsgi(environ, resp.start_response)
2021-03-13 07:15:42,261 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,261 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 69, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,261 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,261 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/request_id.py", line 51, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,262 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,262 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/instrumentation.py", line 149, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,262 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,262 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/logging.py", line 91, in __call__
retval = self.app(environ, custom_start_response)
2021-03-13 07:15:42,263 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,263 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/cors.py", line 90, in __call__
return self.app(environ, custom_start_response)
2021-03-13 07:15:42,263 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,263 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/error_handling.py", line 49, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,264 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,264 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/middleware/streaming.py", line 48, in __call__
return self.app(environ, start_response)
2021-03-13 07:15:42,264 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,265 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 599, in as_wsgi
resp = self(req)
2021-03-13 07:15:42,265 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,265 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/router.py", line 523, in __call__
(func.__name__, endpoint['operationId'], six.text_type(e)))
2021-03-13 07:15:42,265 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,266 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
2021-03-13 07:15:42,266 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,266 140260273373864 ERROR traceback [-] File "/usr/lib/python3.6/logging/__init__.py", line 1343, in exception
self.error(msg, *args, exc_info=exc_info, **kwargs)
2021-03-13 07:15:42,267 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,267 140260273373864 ERROR traceback [-] File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/log.py", line 160, in func_wrapper
return func(*args, **kwargs)
2021-03-13 07:15:42,267 140260273373864 ERROR traceback [-]
2021-03-13 07:15:42,268 140260273373864 ERROR handlers [-] Message: 'Failed to call controller function "get_one" for operation "st2api.controllers.v1.rule_views:rule_view_controller.get_one": Resource with a reference or id "default.test_rule_utf8_nme" not found'
Arguments: ()
2021-03-13 07:15:42,269 140260273373864 INFO logging [-] 0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef - 404 109 43.653ms (method='GET',path='/v1/rules/views/default.test_rule_utf8_n%C3%A1me',remote_addr='127.0.0.1',status=404,runtime=43.653,content_length=109,request_id='0c6a8478-e6a5-42ca-b3cf-c7efc0c724ef')
2021-03-13 07:15:42,281 140260277417984 INFO logging [-] 69e44ae1-1276-4576-8a49-9de4d70e1564 - 200 3820 53.23ms (method='GET',path='/v1/ruleenforcements/views',remote_addr='127.0.0.1',status=200,runtime=53.23,content_length=3820,request_id='69e44ae1-1276-4576-8a49-9de4d70e1564')