Univention Bugzilla – Bug 50174
[UDM HTTP API] settings/data objects cannot be accessed, because Base64Bzip2BinaryProperty(data) is not JSON serializable
Last modified: 2019-09-22 15:51:13 CEST
When accessing a settings/data object (https://m66.uni.dtr/univention/udm/settings/data/cn%3Ducsschool-join-hook.py%2Ccn%3Ddata%2Ccn%3Dunivention%2Cdc%3Duni%2Cdc%3Ddtr) a HTTP 500 happens: -------------------------------------------------------------- HTTP-Error 500: Base64Bzip2BinaryProperty(data) is not JSON serializable Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1469, in _execute result = yield result File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1015, in run value = future.result() File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1024, in run yielded = self.gen.send(value) File "/usr/lib/pymodules/python2.7/univention/management/modules/udm/module.py", line 2594, in get self.content_negotiation(props) File "/usr/lib/pymodules/python2.7/univention/management/modules/udm/module.py", line 507, in content_negotiation self.finish(codec(formatter(response))) File "/usr/lib/pymodules/python2.7/univention/management/modules/udm/module.py", line 627, in get_html pre.text = json.dumps(r, indent=4) File "/usr/lib/python2.7/json/__init__.py", line 251, in dumps sort_keys=sort_keys, **kw).encode(obj) File "/usr/lib/python2.7/json/encoder.py", line 209, in encode chunks = list(chunks) File "/usr/lib/python2.7/json/encoder.py", line 434, in _iterencode for chunk in _iterencode_dict(o, _current_indent_level): File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 442, in _iterencode o = _default(o) File "/usr/lib/python2.7/json/encoder.py", line 184, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: Base64Bzip2BinaryProperty(data) is not JSON serializable
You tested this with the old version?! There is no "Base64Bzip2BinaryProperty" in the lastest code anymore! It works with the latest code on my machine.
OK: settings/data objects canbe accessed and show the "data" property as a base64 encoded string.
<http://errata.software-univention.de/ucs/4.4/282.html>