Closed KNGP14 closed 4 years ago
We have taggroup-titles with special characters like &.
api.get_hosttags()
api.set_hosttags(tags)
Within the tags-dictionary there is a taggroup with "title": "Mail & Ansicht"
tags
"title": "Mail & Ansicht"
Exception: check_mk_web_api.exception.CheckMkWebApiException: Check_MK exception: Failed to parse JSON request: '{"tag_groups": [{"topi ... {"title": "Mail ': Unterminated string starting at: line 1 column 1778 (char 1777)
check_mk_web_api.exception.CheckMkWebApiException: Check_MK exception: Failed to parse JSON request: '{"tag_groups": [{"topi
{"title": "Mail ': Unterminated string starting at: line 1 column 1778 (char 1777)
Workaround in check_mk_web_api/__init__.py:
check_mk_web_api/__init__.py
@staticmethod def __build_request_data(data, request_format): ... # Workaround for special character & return request_string.replace('&', '%26').encode()
Hey, thanks for reporting this issue and sorry for the late response.
Please try if the changes in the PR #17 fix your problem.
Fixed with #17.
We have taggroup-titles with special characters like &.
api.get_hosttags()
:heavy_check_mark: (works)api.set_hosttags(tags)
:x: (fails)Within the
tags
-dictionary there is a taggroup with"title": "Mail & Ansicht"
Exception:
check_mk_web_api.exception.CheckMkWebApiException: Check_MK exception: Failed to parse JSON request: '{"tag_groups": [{"topi
...{"title": "Mail ': Unterminated string starting at: line 1 column 1778 (char 1777)
Workaround in
check_mk_web_api/__init__.py
: