Univention Bugzilla – Bug 52614
Migrate ucs-school-umc-distribution to Python 3
Last modified: 2021-11-29 17:20:19 CET
The package ucs-school-umc-distribution needs to be migrated to Python 3. See: https://hutten.knut.univention.de/mediawiki/index.php/Python_3_Migration
We should also replace ValueError with UMC_Error to suppress the traceback and show a regular error message: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 344, in __error_handling six.reraise(etype, exc, etraceback) File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise raise value File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 247, in execute function.__func__(self, request, *args, **kwargs) File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response return function(self, request) File "/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam/__init__.py", line 492, in add self._save_exam(request) File "/usr/lib/python3/dist-packages/ucsschool/lib/school_umc_ldap_connection.py", line 155, in wrapper_func return func(*args, **kwargs) File "/usr/lib/python3/dist-packages/univention/management/console/modules/schoolexam/__init__.py", line 406, in _save_exam project.validate() File "/usr/lib/python3/dist-packages/univention/management/console/modules/distribution/util.py", line 379, in validate raise ValueError(_("The given project directory name must be non-empty.")) ValueError: Das angegebene Projektverzeichnis darf nicht leer sein.
Migrated the module and the script to Python 3: ucs-school-umc-distribution (18.0.2) bf08232e3cd6 | Bug #52614: migrate ucs-school-umc-distribution to Python 3
(In reply to Florian Best from comment #2) > We should also replace ValueError with UMC_Error to suppress the traceback > and show a regular error message: > > Traceback (most recent call last): > File > "/usr/lib/python3/dist-packages/univention/management/console/base.py", line > 344, in __error_handling > six.reraise(etype, exc, etraceback) > File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise > raise value > File > "/usr/lib/python3/dist-packages/univention/management/console/base.py", line > 247, in execute > function.__func__(self, request, *args, **kwargs) > File > "/usr/lib/python3/dist-packages/univention/management/console/modules/ > decorators.py", line 181, in _response > return function(self, request) > File > "/usr/lib/python3/dist-packages/univention/management/console/modules/ > schoolexam/__init__.py", line 492, in add > self._save_exam(request) > File > "/usr/lib/python3/dist-packages/ucsschool/lib/school_umc_ldap_connection.py", > line 155, in wrapper_func > return func(*args, **kwargs) > File > "/usr/lib/python3/dist-packages/univention/management/console/modules/ > schoolexam/__init__.py", line 406, in _save_exam > project.validate() > File > "/usr/lib/python3/dist-packages/univention/management/console/modules/ > distribution/util.py", line 379, in validate > raise ValueError(_("The given project directory name must be > non-empty.")) > ValueError: Das angegebene Projektverzeichnis darf nicht leer sein. Fixed in: ucs-school-umc-exam (10.0.1) 3fc8f2dd8b59 | Bug #52614: improove error handling ucs-school-umc-distribution (18.0.2) 3fc8f2dd8b59 | Bug #52614: improove error handling
QA: code review: OK py3 migration: OK manual test of the distribution module via UMC: OK at jobs: OK new error handling: OK No related errors in log files: OK No related tests that failed: OK
UCS@school 5.0 v1 has been released. https://docs.software-univention.de/release-notes-ucsschool-5.0v1-de.html If this error occurs again, please clone this bug.