Univention Bugzilla – Bug 42362
AppCenter ImportError: No module named database
Last modified: 2016-09-22 07:16:11 CEST
Version: 4.1-3 errata262 (Vahr) Traceback(5e4aa7948701189481af27899961af4e): Failed to load module appcenter: No module named database Traceback (most recent call last): File "%PY2.7%/univention/management/console/protocol/modserver.py", line 100, in _load_module self.__module = __import__(file_, [], [], modname) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 61, in <module> from univention.appcenter import get_action, AppManager File "%PY2.7%/univention/appcenter/__init__.py", line 35, in <module> from univention.appcenter.actions import get_action, all_actions File "%PY2.7%/univention/appcenter/actions/__init__.py", line 275, in <module> __import__('univention.appcenter.actions.%s' % pymodule_name) File "%PY2.7%/univention/appcenter/actions/__init__.py", line 275, in <module> __import__('univention.appcenter.actions.%s' % pymodule_name) File "%PY2.7%/univention/appcenter/actions/docker_remove.py", line 38, in <module> from univention.appcenter.actions.docker_base import DockerActionMixin File "%PY2.7%/univention/appcenter/actions/docker_base.py", line 43, in <module> from univention.appcenter.database import DatabaseConnector, DatabaseError ImportError: No module named database
Reported again 4 times, 4.1-3 errata262 (Vahr)
Caused by Bug #40857. @Dirk: If you introduce new files you need to symlink this in the preinst e.g.: if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt 1.2.3.4; then ln -s /usr/share/pyshared/univention/foo.py /usr/lib/pymodules/python2.7/univention/foo.py fi And please vote for Bug #28497!
from debian/python-univention-appcenter.preinst: if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt 5.0.22-1; then ln -s /usr/share/pyshared/univention/appcenter/database.py /usr/lib/pymodules/python2.7/univention/appcenter/database.py fi
The same user reported this 3 times today: Konnte das Modul appcenter nicht laden: cannot import name ucr_run_filter Traceback (most recent call last): File "%PY2.7%/univention/management/console/protocol/modserver.py", line 100, in _load_module self.__module = __import__(file_, [], [], modname) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 61, in <module> from univention.appcenter import get_action, AppManager File "%PY2.7%/univention/appcenter/__init__.py", line 35, in <module> from univention.appcenter.actions import get_action, all_actions File "%PY2.7%/univention/appcenter/actions/__init__.py", line 275, in <module> __import__('univention.appcenter.actions.%s' % pymodule_name) File "%PY2.7%/univention/appcenter/actions/docker_upgrade.py", line 36, in <module> from univention.appcenter.docker import rm as docker_rm File "%PY2.7%/univention/appcenter/docker.py", line 52, in <module> from univention.appcenter.ucr import ucr_save, ucr_is_false, ucr_get, ucr_run_filter ImportError: cannot import name ucr_run_filter
(In reply to Dirk Wiesenthal from comment #3) > from debian/python-univention-appcenter.preinst: > > if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt 5.0.22-1; then > ln -s /usr/share/pyshared/univention/appcenter/database.py > /usr/lib/pymodules/python2.7/univention/appcenter/database.py > fi 5.0.22-1 != 5.0.22-12.218.201609071505
Version: 4.1-3 errata268 (Vahr) Remark: Frische Installation in einer Virtuellen Maschine. UCS 4.1-3 (vollständig aktualisiert) Host: Ubuntu 16.04.1 mit KVM/Qemu (vollständig aktualisiert)
Version: 4.1-3 errata262 (Vahr) Remark: sehr geehrte Damen und Herren, diese Fehlermeldung erhalte ich an einem frisch installiertem UCS. Bisher wurde UCS genutzt um über das APPCenter einige Apps zu installieren. Anschließend wurde über die Console über apt-get update && upgrade geupdated. Nach einem reboot reagiert das System mit dem beigefügten Fehler. mit freundlichen Grüßen
Reported again, 4.1-3 errata268 (Vahr)
Reported again, 3 times, 4.1-3 errata268 (Vahr)
Fixed in univention-appcenter 5.0.22-17.223.201609200055 Currently, it looks like python-univention-appcenter failed to install for some reason (not yet known). But univention-appcenter-docker succeeded to install which caused the traceback as this package assumes python-univention-appcenter to be at the same version. Made this assumption explicit in debian/control. Unfortunately, as the reason for all this is still unclear, QA can only verify that this fix solves the problem given that the theory about broken packages is correct.
Problem was Bug#42450. The fix applied here should indeed prevent this traceback.
FAIL - yaml OK - univention-appcenter-* packages depend on python-univention-appcenter (= ${source:Version}) OK - merged to 4.2-0
YAML added
univention-appcenter: Installiert: 5.0.22-17.223.201609200055 Installationskandidat: 5.0.22-17.223.201609200055 Versionstabelle: *** 5.0.22-17.223.201609200055 0 500 http://192.168.0.10/build2/ ucs_4.1-0-errata4.1-3/all/ Packages -> more univention-appcenter.yaml ...fix: 5.0.22-16.222.201609200036 5.0.22-16... != 5.0.22-17
Fixed in r72710
OK
<http://errata.software-univention.de/ucs/4.1/272.html>