Univention Bugzilla – Bug 53058
AttributeError: 'str' object has no attribute 'decode' traceback when setting UCR policy
Last modified: 2021-05-25 15:58:44 CEST
Reproduce: - create a new UCR policy with at least one key,value pair - open udm object that supports settings UCR policy. E.g. Primary Directory Node in Computers module - select "Policies" tab and got to "Policy: Univention Configuration Registry" - select created UCR policy -> the following traceback occurs: Internal server error during "udm/object/policies (computers/computer)". Request: udm/object/policies (computers/computer) File "/usr/lib/python3/dist-packages/notifier/threads.py", line 80, in _run result = self._function() File "/usr/lib/python3/dist-packages/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "/usr/lib/python3/dist-packages/univention/management/console/modules/udm/__init__.py", line 1219, in _thread policy_obj.policy_result(faked_policy_reference) File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 3409, in policy_result self._custom_policy_result_map() File "/usr/lib/python3/dist-packages/univention/admin/handlers/policies/registry.py", line 173, in _custom_policy_result_map self.polinfo = self._post_unmap(self.polinfo, values) File "/usr/lib/python3/dist-packages/univention/admin/handlers/policies/registry.py", line 127, in _post_unmap info['registry'].append([key_name, ldap_value[0].decode('UTF-8').strip()]) AttributeError: 'str' object has no attribute 'decode'
Fixed in: univention-directory-manager-modules (15.0.8-1) 7f77a72b133e | fixup! Bug #50648 UDM policies/registry: Make python3 compatible *** This bug has been marked as a duplicate of bug 50648 ***
OK: UCR policy can be selected -> verified
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".