Bug 53058 - AttributeError: 'str' object has no attribute 'decode' traceback when setting UCR policy
AttributeError: 'str' object has no attribute 'decode' traceback when setting...
Status: CLOSED DUPLICATE of bug 50648
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Florian Best
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-12 11:15 CEST by Johannes Keiser
Modified: 2021-05-25 15:58 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Keiser univentionstaff 2021-04-12 11:15:17 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'
Comment 1 Florian Best univentionstaff 2021-04-14 21:30:04 CEST
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 ***
Comment 2 Johannes Keiser univentionstaff 2021-04-19 11:16:44 CEST
OK: UCR policy can be selected
-> verified
Comment 3 Florian Best univentionstaff 2021-05-25 15:58:44 CEST
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".