Univention Bugzilla – Bug 54716
ucs-school-user-logonscript-daemon.log: 'NoneType' object has no attribute 'rpartition'
Last modified: 2023-03-31 09:52:57 CEST
After setting up a UCS@school single server I see these repeated error messages getting logged: ``` ==> /var/log/univention/ucs-school-user-logonscript-daemon.log <== 2022-05-05 16:41:21,980 [INFO] updating logon script for uid=demo_student,cn=schueler,cn=users,ou=DEMOSCHOOL,dc=autotest201,dc=local 2022-05-05 16:41:21,985 [ERROR] An error occured while processing "uid=demo_student,cn=schueler,cn=users,ou=DEMOSCHOOL,dc=autotest201,dc=local": AttributeError("'NoneType' object has no attribute 'rpartition'") ==> /var/log/univention/ucs-school-user-logonscript-daemon.log <== 2022-05-05 16:41:52,090 [INFO] updating logon script for uid=join-backup,cn=users,dc=autotest201,dc=local 2022-05-05 16:41:52,096 [ERROR] An error occured while processing "uid=join-backup,cn=users,dc=autotest201,dc=local": AttributeError("'NoneType' object has no attribute 'rpartition'") ==> /var/log/univention/ucs-school-user-logonscript-daemon.log <== 2022-05-05 16:41:57,111 [INFO] updating logon script for uid=Administrator,cn=users,dc=autotest201,dc=local 2022-05-05 16:41:57,119 [ERROR] An error occured while processing "uid=Administrator,cn=users,dc=autotest201,dc=local": AttributeError("'NoneType' object has no attribute 'rpartition'") ``` This happened in a manually installed system as well as on a reference system created via: REPLACE=true KVM_BUILD_SERVER=ranarp.knut.univention.de DOCKER=true ./utils/start-test.sh scenarios/autotest-201-ucsschool-singleserver-s4.cfg
root@master201:~# univention-app info UCS: 5.0-0 errata0 Installed: cups=2.2.1 radius=5.0 samba4=4.13 self-service-backend=5.0 squid=3.5 ucsschool=5.0 v1 4.4/ucsschool-veyon-proxy=1.1 Upgradable:
happens when `ucsschool/userlogon/my_files_link_icon` or `ucsschool/userlogon/other_links_icon` is not set via UCR. So this happens when the script is called before the package postinst was executed. Fix might be just: diff --git ucs-school-netlogon-user-logonscripts/ucs-school-user-logonscript-daemon ucs-school-netlogon-user-logonscripts/ucs-school-user-logonscript-daemon index 917e14a8d..23b7d233a 100755 --- ucs-school-netlogon-user-logonscripts/ucs-school-user-logonscript-daemon +++ ucs-school-netlogon-user-logonscripts/ucs-school-user-logonscript-daemon @@ -656,11 +656,13 @@ class QueueHandler: ) # '%SystemRoot%\system32\imageres.dll,143' self.my_files_link_name = self.ucr.get("ucsschool/userlogon/my_files_link_name", "Meine Dateien") self.my_files_link_icon = self.ucr.get( - "ucsschool/userlogon/my_files_link_icon" - ) # '%SystemRoot%\system32\imageres.dll,207' + "ucsschool/userlogon/my_files_link_icon", + r'%SystemRoot%\system32\imageres.dll,207' + ) self.other_links_icon = self.ucr.get( - "ucsschool/userlogon/other_links_icon" - ) # '%SystemRoot%\system32\imageres.dll,193' + "ucsschool/userlogon/other_links_icon", + r'%SystemRoot%\system32\imageres.dll,193' + ) self.myshares_name = self.ucr.get("ucsschool/userlogon/myshares/name", "Eigene Dateien") self.mypictures_name = self.ucr.get("ucsschool/userlogon/mypictures/name", "Eigene Bilder") self.create_drive_mappings = self.ucr.is_true("ucsschool/userlogon/create_drive_mappings", True)
(In reply to Florian Best from comment #2) > happens when `ucsschool/userlogon/my_files_link_icon` or > `ucsschool/userlogon/other_links_icon` is not set via UCR. > So this happens when the script is called before the package postinst was > executed. Having no icon set is a valid setting. So enforcing a default value is unfortunately no solution. I think the origin of the traceback is in fix_win10_icon_index(self, icon_path) which should not fail if icon_path is None.
By default the 2 variables are already set. So it affects only a smaller group of customers. Workaround: set the UCR variable to set a icon