Bug 41090 - AttributeError: 'module' object has no attribute 'oxFetchmailProtocol'
AttributeError: 'module' object has no attribute 'oxFetchmailProtocol'
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-21 09:12 CEST by Florian Best
Modified: 2023-07-06 19:19 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021113021000693, 2021113021000701, 2021112121000334, 2021112121000281, 2021112121000272, 2023012321001121, 2023070221000151, 2023012121000215, 2023012121000206
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-04-21 09:12:14 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'
Comment 1 Stefan Gohmann univentionstaff 2019-01-03 07:16:59 CET
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.
Comment 2 Maximilian Janßen univentionstaff 2021-11-24 11:30:48 CET
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
Comment 3 Maik F. 2023-01-21 19:11:47 CET
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
Comment 4 Florian Best univentionstaff 2023-01-23 12:00:40 CET
which OX version is used?
`univention-app info` can give relevant information.
Comment 5 Maik F. 2023-01-23 23:08:37 CET
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!
Comment 6 Mika Westphal univentionstaff 2023-01-27 10:49:17 CET
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'
Comment 7 Michel B. 2023-07-02 22:44:08 CEST
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.
Comment 8 Florian Best univentionstaff 2023-07-03 14:53:18 CEST
(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?
Comment 9 Maximilian Janßen univentionstaff 2023-07-06 19:18:29 CEST
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