Univention Bugzilla – Bug 41090
AttributeError: 'module' object has no attribute 'oxFetchmailProtocol'
Last modified: 2023-07-06 19:19:10 CEST
Exception during reloading some modules (univention.admin.modules.update()). The new handler for fetchmail was added but the old syntax classes were still loaded. Version: 4.0-3 errata385 (Walle) Konnte das Modul udm nicht laden: 'module' object has no attribute 'oxFetchmailProtocol' 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/udm/__init__.py", line 69, in <module> from .udm_ldap import ( File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 69, in <module> udm_modules.update() File "%PY2.7%/univention/admin/modules.py", line 95, in update os.path.walk(dir, _walk, p) File "/usr/lib/python2.7/posixpath.py", line 246, in walk walk(name, func, arg) File "/usr/lib/python2.7/posixpath.py", line 238, in walk func(arg, top, names) File "%PY2.7%/univention/admin/modules.py", line 76, in _walk m=__import__(mod, globals(), locals(), name) File "%PY2.7%/univention/admin/handlers/oxmail/oxfetchmailsingle.py", line 90, in <module> syntax=univention.admin.syntax.oxFetchmailProtocol, AttributeError: 'module' object has no attribute 'oxFetchmailProtocol'
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016. Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Reported again (this time in oxfetchmailmulti.py and not oxfetchmailsingle.py): Version: 4.4-8 errata1101 (Blumenthal) Error: Traceback (most recent call last): File "%PY2.7%/univention/management/console/protocol/modserver.py", line 114, in _load_module self.__module = __import__(file_, {}, {}, modname) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 73, in <module> from .udm_ldap import ( File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 70, in <module> udm_modules.update() File "%PY2.7%/univention/admin/modules.py", line 123, in update _walk(root, w_root, w_files) File "%PY2.7%/univention/admin/modules.py", line 110, in _walk m = importlib.import_module('univention.admin.handlers.%s' % (modulepackage,)) # type: Any File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "%PY2.7%/univention/admin/handlers/oxmail/oxfetchmailmulti.py", line 87, in <module> syntax=univention.admin.syntax.oxFetchmailProtocol, AttributeError: 'module' object has no attribute 'oxFetchmailProtocol' Role: domaincontroller_master
Same here: No way to add/edit users from invention management console. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/management/console/protocol/modserver.py", line 114, in _load_module self.__module = __import__(file_, {}, {}, modname) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/__init__.py", line 73, in <module> from .udm_ldap import ( File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/udm/udm_ldap.py", line 70, in <module> udm_modules.update() File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 123, in update _walk(root, w_root, w_files) File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 110, in _walk m = importlib.import_module('univention.admin.handlers.%s' % (modulepackage,)) # type: Any File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/oxmail/oxfetchmailmulti.py", line 87, in <module> syntax=univention.admin.syntax.oxFetchmailProtocol, AttributeError: 'module' object has no attribute 'oxFetchmailProtocol' Same problem with version 4.4-9 UCS-Version 4.4-8 errata1111 (Blumenthal) UMC-Version 11.0.6-17A~4.4.0.202108311507 Gültigkeitsdatum des SSL-Wurzel-Zertifikats 10. Februar 2024 um Gültigkeitsdatum des SSL-Rechner-Zertifikats 10. Februar 2024 um
which OX version is used? `univention-app info` can give relevant information.
UCS: 4.4-9 errata1362 also: 4.4-8 errata1111 (Blumenthal) There is now way to edit users anymore (through GUI). Same error with univention-upgrade: Let's Encrypt: Version 1.2.2-8 can be upgraded to 1.2.2-20 Starting app upgrade Do you want to upgrade Let's Encrypt [Y|n]? Y An error occurred - see "/var/log/univention/updater.log" for details Administrator@plattform:~$ sudo tail /var/log/univention/updater.log File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 123, in update _walk(root, w_root, w_files) File "/usr/lib/python2.7/dist-packages/univention/admin/modules.py", line 110, in _walk m = importlib.import_module('univention.admin.handlers.%s' % (modulepackage,)) # type: Any File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/oxmail/oxfetchmailmulti.py", line 87, in <module> syntax=univention.admin.syntax.oxFetchmailProtocol, AttributeError: 'module' object has no attribute 'oxFetchmailProtocol' Thank you!
Version: 4.4-9 errata1362 (Blumenthal) Role: domaincontroller_master Error: Traceback (most recent call last): File "%PY2.7%/univention/management/console/protocol/modserver.py", line 114, in _load_module self.__module = __import__(file_, {}, {}, modname) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 73, in <module> from .udm_ldap import ( File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 70, in <module> udm_modules.update() File "%PY2.7%/univention/admin/modules.py", line 123, in update _walk(root, w_root, w_files) File "%PY2.7%/univention/admin/modules.py", line 110, in _walk m = importlib.import_module('univention.admin.handlers.%s' % (modulepackage,)) # type: Any File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "%PY2.7%/univention/admin/handlers/oxmail/oxfetchmailmulti.py", line 87, in <module> syntax=univention.admin.syntax.oxFetchmailProtocol, AttributeError: 'module' object has no attribute 'oxFetchmailProtocol'
The Issue stems from two missing files: /usr/lib/python2.7/dist-packages/univention/admin/syntax.d/50_ox.py and /usr/lib/python2.7/dist-packages/univention/admin/syntax.d/50_ox.pyc which include said "oxFetchmailProtocol" Attributes. Getting those from a newer version (tested was UCS 4.4-9) and placing them in the required location fixed the Issue.
(In reply to Michel B. from comment #7) Which OX version do you use? (univention-app info output) Which UCS versions do you use and on which server roles?
Version: 4.4-8 errata1111 (Blumenthal) Error: Interner Server-Fehler in "appcenter/query". Request: appcenter/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/protocol/modserver.py", line 202, in _recv self.handle(msg) File "%PY2.7%/univention/management/console/protocol/modserver.py", line 272, in handle six.reraise(self.__init_etype, self.__init_exc, self.__init_etraceback) File "%PY2.7%/univention/management/console/protocol/modserver.py", line 313, in handle self.__handler.init() File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 155, in init _update_modules() File "%PY2.7%/univention/appcenter/udm.py", line 62, in _update_modules udm_modules.update() File "%PY2.7%/univention/admin/modules.py", line 123, in update _walk(root, w_root, w_files) File "%PY2.7%/univention/admin/modules.py", line 110, in _walk m = importlib.import_module('univention.admin.handlers.%s' % (modulepackage,)) # type: Any File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "%PY2.7%/univention/admin/handlers/oxmail/oxfetchmailmulti.py", line 87, in <module> syntax=univention.admin.syntax.oxFetchmailProtocol, AttributeError: 'module' object has no attribute 'oxFetchmailProtocol' Role: domaincontroller_master