Univention Bugzilla – Bug 52568
office365/query, AttributeError: 'NoneType' object has no attribute 'startswith'
Last modified: 2022-05-12 11:06:26 CEST
Version: 4.4-6 errata814 (Blumenthal) Error: Interner Server-Fehler in "office365/query". Request: office365/query Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling six.reraise(etype, exc, etraceback) File "%PY2.7%/univention/management/console/base.py", line 262, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 321, in _response result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/office365/__init__.py", line 91, in query 'initialized': AzureAuth.is_initialized(self.adconnection_alias), File "%PY2.7%/univention/office365/azure_auth.py", line 376, in is_initialized tokens = cls.load_tokens(adconnection_alias) File "%PY2.7%/univention/office365/azure_auth.py", line 418, in load_tokens return JsonStorage(AzureADConnectionHandler.get_conf_path('TOKEN_FILE', adconnection_alias)).read() File "%PY2.7%/univention/office365/azure_auth.py", line 98, in get_conf_path conf_dir = os.path.join(ADCONNECTION_CONF_BASEPATH, adconnection_alias) File "/usr/lib/python2.7/posixpath.py", line 68, in join if b.startswith('/'): AttributeError: 'NoneType' object has no attribute 'startswith' Role: domaincontroller_backup
I customer tries to open the AD Connection univention-app info UCS: 4.4-7 errata907 Installed: apple-school-manager=2.2.3 office365=3.4 samba4=4.10 ucsschool=4.4 v8 ucr get server/role domaincontroller_backup and gets the same traceback: nterner Server-Fehler in "office365/query". Request: office365/query Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling six.reraise(etype, exc, etraceback) File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute function.__func__(self, request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 321, in _response result = _multi_response(self, request) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response return function(self, request) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 443, in _response return list(function(self, iterator, *nones)) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 289, in _fake_func yield function(self, *args) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/office365/__init__.py", line 92, in query 'initialized': AzureAuth.is_initialized(self.adconnection_alias), File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 376, in is_initialized tokens = cls.load_tokens(adconnection_alias) File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 418, in load_tokens return JsonStorage(AzureADConnectionHandler.get_conf_path('TOKEN_FILE', adconnection_alias)).read() File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 98, in get_conf_path conf_dir = os.path.join(ADCONNECTION_CONF_BASEPATH, adconnection_alias) File "/usr/lib/python2.7/posixpath.py", line 68, in join if b.startswith('/'): AttributeError: 'NoneType' object has no attribute 'startswith'
The configuration of the app is not possible.
(In reply to Christina Scheinig from comment #2) > The configuration of the app is not possible. The app was installed on a backup server before, but this was broken and replaced by this. With the first installation also office365=3.4 the configuration was still possible.
After rerunning the joinscript the error still occurs. The udm module shows the subscription udm office365/profile list DN: office365ProfileName=Default Office 365 Subscription,cn=profiles,cn=office365,dc=example,dc=com name: Default Office 365 Subscription subscription: ENTERPRISEPACK
Please ignore my previous comment, I misunderstood the problem. -------------------------------------------------- The ucr variable office365/adconnection/wizard did not exist. Setting it to office365/adconnection/wizard: defaultADconnection like it is on my test system made it so the wizard could be opened successfully. 
How to reproduce this issue? The app joinscript creates the default connection, which sets the UCRv /usr/share/univention-office365/scripts/manage_adconnections create defaultADconnection --makedefault
*** Bug 54080 has been marked as a duplicate of this bug. ***
Added new checks and messages in case of empty default value for adconnection. Updated translations. univention-office365 (2.0.2-161) 21a9f7643ed6 | Bug #52568: changelog ffd01c46c374 | Bug #52568: Fix for office365/query, AttributeError: 'NoneType' object has no attribute 'startswith'
Published with UCS 4.4 app version 4.2