Ich habe einen großen Fehler gemacht und wollte auf die aktuelle Version Updaten. Da dabei ja auch Postgres geupdatet werden muss, habe ich alle meine Daten gesichert, Postgres aktualisiert (so wie hier beschrieben), habe dann mit „docker-compose run --rm webserver createsuperuser“ einen neuen Superuser angelegt und wollte dann meine Daten wieder importieren.
Leider scheitert es daran mit folgender FM:
oliver@Zion:/volume1/docker/paperless-ngx/config$ sudo docker-compose exec webserver document_importer ../export
System check identified some issues:
WARNINGS:
?: OCR output mode "skip_noarchive" is deprecated and will be removed in a future version. Please use PAPERLESS_OCR_SKIP_ARCHIVE_FILE instead.
Found existing user(s), this might indicate a non-empty installation
Found existing documents(s), this might indicate a non-empty installation
Checking the manifest
Database import failed
No version information present
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
raise ex.with_traceback(None)
psycopg.errors.NotNullViolation: null value in column "pdf_layout" of relation "paperless_mail_mailrule" violates not-null constraint
DETAIL: Failing row contains (3, Shell-Tankbelege, INBOX, null, Ihr Shell SmartPay Tankbeleg, null, 2000, 3, null, 1, 4, 3, 5, 5, 2, 1, *.pdf, 1, null, null, t, null, t, null).
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/paperless/src/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/paperless/src/documents/management/commands/document_importer.py", line 280, in handle
self.load_data_to_database()
File "/usr/src/paperless/src/documents/management/commands/document_importer.py", line 223, in load_data_to_database
raise e
File "/usr/src/paperless/src/documents/management/commands/document_importer.py", line 204, in load_data_to_database
call_command("loaddata", manifest_path)
File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 194, in call_command
return command.execute(*args, **defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/loaddata.py", line 103, in handle
self.loaddata(fixture_labels)
File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/loaddata.py", line 164, in loaddata
self.load_label(fixture_label)
File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/loaddata.py", line 254, in load_label
if self.save_obj(obj):
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/loaddata.py", line 210, in save_obj
obj.save(using=self.using)
File "/usr/local/lib/python3.12/site-packages/django/core/serializers/base.py", line 265, in save
models.Model.save_base(self.object, using=using, raw=True, **kwargs)
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 998, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1161, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1202, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/query.py", line 1847, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1836, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 79, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 100, in _execute
with self.db.wrap_database_errors:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
raise ex.with_traceback(None)
django.db.utils.IntegrityError: Problem installing fixture '/usr/src/paperless/export/manifest.json': Could not load paperless_mail.MailRule(pk=3): null value in column "pdf_layout" of relation "paperless_mail_mailrule" violates not-null constraint
DETAIL: Failing row contains (3, Shell-Tankbelege, INBOX, null, Ihr Shell SmartPay Tankbeleg, null, 2000, 3, null, 1, 4, 3, 5, 5, 2, 1, *.pdf, 1, null, null, t, null, t, null).
ERROR: 1
oliver@Zion:/volume1/docker/paperless-ngx/config$
Kann mir jemand helfen? Ich hab das „kleine“ Paket, also die Config von hier und alles so gemacht wie beschrieben.
Danke.
O.
Sorry, vergessen, paperless läuft im Docker auf meiner Synology!

