Univention Bugzilla – Bug 39417
appcenter/query: 'NoneType' object has no attribute 'id'
Last modified: 2015-11-17 12:12:41 CET
Die Ausführung des Kommandos appcenter/query ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 301, in execute function(self, request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 103, in _decorated return func(self, request, *a, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 177, in query props = application.to_dict(self.package_manager, domainwide_managed, hosts) File "%PY2.7%/univention/management/console/modules/decorators.py", line 648, in wrapper return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 969, in to_dict res['config'] = configure.list_config(self.to_app()) File "%PY2.7%/univention/appcenter/actions/configure.py", line 104, in list_config cls.debug('Finding all configuration options for %s' % app.id) AttributeError: 'NoneType' object has no attribute 'id' Remark: Auf einem UCS 4.1 "einfach" das AppCenter aufgerufen Version: 4.1-0 errata0 (Vahr)
This is due to a context switch between the old legacy Application class from the UMC module and the new App class from the App Center lib. The frontend should use the new App class wherever possible. The old class may be used in sensitive areas where it is well tested. More specifically, the problem here was that the ini file was flawed. The old class accepted it anyway, using some default values, the new class refused to get initialized. Hence the NoneType error.
I have cut the old Application class where possible and used the new App class. The installation routine still uses the old class because I do not want to introduce instability in such a critical part of the App Center. The initial traceback should be gone. univention-management-console-module-appcenter 5.0.6-23.470.201510160126
I wasn't able to reproduce it.
UCS 4.1 has been released: https://docs.software-univention.de/release-notes-4.1-0-en.html https://docs.software-univention.de/release-notes-4.1-0-de.html If this error occurs again, please use "Clone This Bug".