Problem
When running an import through the web-based HTTP-API Importer you get an validation error during dry-run.
Environment
The log file /var/log/univention/ucs-school-import/workers-dryrun.log
shows errors and traceback like this:
[2020-01-31 11:13:24,493: WARNING/Worker-3] 2020-01-31 11:13:24 INFO tasks.dry_run:132 Finished dry run 137.
[2020-01-31 11:13:24,493: WARNING/Worker-3] Traceback (most recent call last):
[2020-01-31 11:13:24,493: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
[2020-01-31 11:13:24,493: WARNING/Worker-3] msg = self.format(record)
[2020-01-31 11:13:24,493: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
[2020-01-31 11:13:24,493: WARNING/Worker-3] return fmt.format(record)
[2020-01-31 11:13:24,494: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 466, in format
[2020-01-31 11:13:24,494: WARNING/Worker-3] if self.usesTime():
[2020-01-31 11:13:24,494: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 450, in usesTime
[2020-01-31 11:13:24,494: WARNING/Worker-3] return self._fmt.find("%(asctime)") >= 0
[2020-01-31 11:13:24,494: WARNING/Worker-3] AttributeError: 'int' object has no attribute 'find'
[2020-01-31 11:13:24,494: WARNING/Worker-3] Logged from file tasks.py, line 132
[2020-01-31 11:13:24,494: WARNING/Worker-3] Traceback (most recent call last):
[2020-01-31 11:13:24,494: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
[2020-01-31 11:13:24,494: WARNING/Worker-3] msg = self.format(record)
[2020-01-31 11:13:24,494: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
[2020-01-31 11:13:24,495: WARNING/Worker-3] return fmt.format(record)
[2020-01-31 11:13:24,495: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 466, in format
[2020-01-31 11:13:24,495: WARNING/Worker-3] if self.usesTime():
[2020-01-31 11:13:24,495: WARNING/Worker-3] File "/usr/lib/python2.7/logging/__init__.py", line 450, in usesTime
[2020-01-31 11:13:24,495: WARNING/Worker-3] return self._fmt.find("%(asctime)") >= 0
[2020-01-31 11:13:24,495: WARNING/Worker-3] AttributeError: 'int' object has no attribute 'find'
[2020-01-31 11:13:24,495: WARNING/Worker-3] Logged from file tasks.py, line 132
[2020-01-31 11:13:24,493: INFO/Worker-3] Finished dry run 137.
This is a bug which has already been released.
Should be fixed in ucs@school v4.4
Solution
Even if you already have ucs@school v4.4 installed make sure you have as well installed the latest package updates (either thorugh UMC or command line as shown):
apt update
apt upgrade
systemctl restart apache2
systemctl restart ucs-school-import-http-api
systemctl restart postgresql
systemctl restart rabbitmq-server
systemctl restart celery-worker-ucsschool-import