Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 38:44:32 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
23 files (29,781K bytes) |
Messages: | 174,060 |
Hi Michael
My name is Gerald and I'm a paperless user since many years.
Currently my instance runs with docker on an old Qnap-NAS, but I want
to move it to my new FreeBSD based home server in a jail. So thank
you for making paperless-ngx available for FreeBSD. The installation
with pkg wasn't a problem, I could upload some pdfs into the new
paperless and work with them and export them normally. To transfer my documents I used document_exporter on the old instance 2.16.3 and
tried to import them with document_importer on the new instance,
where I ran into this error:
root@paperless:~ # su -l paperless
$ paperless document_importer /tmp/paperless_216_20250920
Checking the manifest
Database import failed
No version information present
Traceback (most recent call last):
File
"/usr/local/lib/python3.11/site-packages/django/db/models/options.py",
line 676, in get_field return self.fields_map[field_name] ~~~~~~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'remote_port'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/core/serializers/json.py", line 70, in Deserializer yield from PythonDeserializer(objects,
**options) File "/usr/local/lib/python3.11/site-packages/django/core/serializers/python.py", line 141, in Deserializer field = Model._meta.get_field(field_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/options.py",
line 678, in get_field raise FieldDoesNotExist( django.core.exceptions.FieldDoesNotExist: LogEntry has no field named 'remote_port'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/paperless/manage.py",
line 10, in <module> execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.11/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.11/site-packages/django/core/management/base.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paperless/documents/management/commands/document_importer.py",
line 280, in handle self.load_data_to_database() File "/usr/local/lib/python3.11/site-packages/paperless/documents/management/commands/document_importer.py",
line 223, in load_data_to_database raise e File "/usr/local/lib/python3.11/site-packages/paperless/documents/management/commands/document_importer.py",
line 204, in load_data_to_database call_command("loaddata",
manifest_path) File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 194, in call_command return command.execute(*args, **defaults) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/loaddata.py",
line 103, in handle self.loaddata(fixture_labels) File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/loaddata.py",
line 164, in loaddata self.load_label(fixture_label) File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/loaddata.py",
line 252, in load_label for obj in objects: File "/usr/local/lib/python3.11/site-packages/django/core/serializers/json.py", line 74, in Deserializer raise DeserializationError() from exc django.core.serializers.base.DeserializationError: Problem installing
fixture '/tmp/paperless_216_20250920/manifest.jsonrCy:
After some investigation I found out, that in the db of the FreeBSD
variant of paperless the field remote_port is missing in the table
logentry. Which lead me to the command 'paperless showmigrations', so
that I could compare the migrations of my two instances. The only
difference I found were this two migrations:
auditlog
...
[X] 0016_logentry_remote_port
[X] 0017_add_actor_email
Looking
into https://github.com/jazzband/django-auditlog/tree/v3.1.0/auditlog/migrations shows, that this two migrations were introduced with version 3.1.0 of django-auditlog, but the port of paperless 2.16 is using version 3.0.0 of it.
A first very, very naive try to solve this, was to install pip via
pkg, removing py311-dj51-django-auditlog via pkg and installing django-auditlog via pip. Result: import works, paperless itself
works, but export crashes, which I use to backup the documents.
My second attempt was to use the port collection. Here what I tried:
- installed ports collection into jail
- adapted Makefile and distinfo in
/usr/ports/www/py-dj51-django-auditlog with some help from claude
code (sorry, never touched a port before)
- pkg remove -f py311-dj51-django-auditlog
- make install
- pkg check -d -> Checking all packages: 100%
- restart paperless jail
- import of documents works
- paperless itself works, so far I could test it
- export of documents works
Could you please have a look into the problem?
Please find the diff file for the port attached to this email.