Univention Bugzilla – Bug 44607
'NoneType' object has no attribute 'categories'
Last modified: 2018-10-26 17:15:38 CEST
Die Ausführung des Kommandos setup/apps/query wizard ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 249, in execute function.__func__(self, request, *args, **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 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 724, in apps_query return util.get_apps(True) File "%PY2.7%/univention/management/console/modules/setup/util.py", line 771, in get_apps return [get.to_dict(app) for app in Apps().get_all_apps() if app.is_ucs_component()] File "%PY2.7%/univention/appcenter/app.py", line 1050, in is_ucs_component return 'UCS components' in app.categories AttributeError: 'NoneType' object has no attribute 'categories' Version: 4.2-0 errata0 (Lesum)
Maybe this was UCS 4.2 RC?
Reported again, 4.2-0 errata0 (Lesum)
Version: 4.2-1 errata99 (Lesum) Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 249, in execute function.__func__(self, request, *args, **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 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 198, in query info = domain.to_dict(apps) File "%PY2.7%/univention/appcenter/actions/domain.py", line 109, in to_dict app_dict = get.to_dict(app) File "%PY2.7%/univention/appcenter/actions/get.py", line 115, in to_dict ret['is_ucs_component'] = app.is_ucs_component() File "%PY2.7%/univention/appcenter/app.py", line 1080, in is_ucs_component return 'UCS components' in app.categories AttributeError: 'NoneType' object has no attribute 'categories'
The traceback can only occur when .apps.de.json and .apps.en.json differ (more than regarding the obvious localized texts that is...) and the German cache has a new App that the English one does not.
*** Bug 45434 has been marked as a duplicate of this bug. ***
Fixed in univention-appcenter 6.0.10-8A~4.2.0.201709251234 I now do a touch on the downloaded .all.tar once it was extracted. The cache now checks the mtime of this archive instead of the actual json cache file.
My theory is that the cache is *building* while the all.tar archive is unpacking (that means that the cache will be outdated because it does not yet have all the new ini files available). The cache finished reading the ini files after the archive is finished unpacking and then saves its already outdated cache in a cache file. If this happens while a new App is added, this traceback occurs.
OK - update, and the appcenter in general seems to work OK - jenkins tests OK - YAML
Several updater and app center tests fail in Jenkins since a few days: http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-2/job/AutotestJoin/SambaVersion=s3,Systemrolle=member/27/testReport/ 20_appcenter.75_umc_query_app_data.test 09_updater.22minor.test 09_updater.23major.test 09_updater.27updateto.test 09_updater.28errors.test 09_updater.37version-max.test 09_updater.49component-version-current-dep.test 20_appcenter.100_settings.test I see the following traceback in updater.log so I guess these changes are relevant: 2017-09-26 19:43:54,415 DEBUG:univention.appcenter.actions.upgrade-search.progress:100 Cannot load cache: mtimes of cache files do not match: 1506467606.2867403 != None 2017-09-26 19:43:54,416 DEBUG:univention.appcenter.cache:Cannot load cache: mtimes of cache files do not match: 1506467606.2867403 != None Traceback in univention-upgrade: Traceback (most recent call last): File "/usr/sbin/univention-upgrade", line 434, in do_update update_available = performUpdate(options, checkForUpdates=options.check, silent=False) File "/usr/sbin/univention-upgrade", line 138, in performUpdate if func(options, checkForUpdates, silent): File "/usr/sbin/univention-upgrade", line 270, in do_app_updates new_apps = list(app_upgrade.iter_upgradable_apps()) File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/upgrade.py", line 104, in iter_upgradable_apps for app in Apps().get_all_locally_installed_apps(): File "/usr/lib/pymodules/python2.7/univention/appcenter/app_cache.py", line 77, in get_all_locally_installed_apps for app in self.get_every_single_app(): File "/usr/lib/pymodules/python2.7/univention/appcenter/app_cache.py", line 490, in get_every_single_app for app in app_cache.get_every_single_app(): File "/usr/lib/pymodules/python2.7/univention/appcenter/app_cache.py", line 447, in get_every_single_app ret.extend(app_cache.get_every_single_app()) File "/usr/lib/pymodules/python2.7/univention/appcenter/app_cache.py", line 333, in get_every_single_app if self._save_cache(): File "/usr/lib/pymodules/python2.7/univention/appcenter/app_cache.py", line 213, in _save_cache os.utime(cache_file, (archive_modified, archive_modified)) TypeError: an integer is required
Yes, fixed in univention-appcenter 6.0.10-12A~4.2.0.201709271345 From what I understand, this actually might have been a problem with this change in combination with the also new support for 4.3-Apps during the upgrade to 4.3. See Bug#45429.
Advisory - OK Code and functionality - OK The regression shown in comment #9 is addressed with commit b83206118345f6363a4e2a0c88b020eddcc2a82e. Cases where where the modification time is not existent are now handled correctly.
Version: 4.2-1 errata118 (Lesum)
Version: 4.2-2 errata52 (Lesum)
<http://errata.software-univention.de/ucs/4.2/199.html>
Reported again: Version: 4.2-1 errata133 (Lesum)
Reported again: Version: 4.2-2 errata52 (Lesum) Traceback: Same as Comment 3
Reported again: Version: 4.2-1 errata131 (Lesum) Die Ausführung des Kommandos setup/apps/query wizard ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 249, in execute function.__func__(self, request, *args, **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 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 725, in apps_query return util.get_apps(True) File "%PY2.7%/univention/management/console/modules/setup/util.py", line 774, in get_apps return [get.to_dict(app) for app in Apps().get_all_apps() if app.is_ucs_component()] File "%PY2.7%/univention/appcenter/app.py", line 1080, in is_ucs_component return 'UCS components' in app.categories AttributeError: 'NoneType' object has no attribute 'categories'