You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
I have the following setup. Paperless-ng is on a Synology DiskStation where I created a shared folder for the document consumption.
I mounted this folder on a Linux laptop and I am scanning via a bash script.
After scanning to a temporary folder, the script does a
"mv $TEMP_DIR/output.pdf $OUTPUT_NAME"
Where $OUTPUT_NAME is on the NFS folder.
Consumption by paperless-ng it basically works, but it seems to try to consume the same file lots of times:
[2021-12-18 16:12:06,433] [INFO] [paperless.consumer] Document 2019-02-01 20211218_170846 consumption finished
[2021-12-18 16:12:07,169] [ERROR] [paperless.consumer] The following error occured while consuming 20211218_170846.pdf: UNIQUE constraint failed: documents_document.checksum
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.IntegrityError: UNIQUE constraint failed: documents_document.checksum
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/paperless/src/documents/consumer.py", line 287, in try_consume_file
document = self._store(
File "/usr/src/paperless/src/documents/consumer.py", line 382, in _store
document = Document.objects.create(
File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 453, in create
obj.save(force_insert=True, using=self.db)
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 726, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 763, in save_base
updated = self._save_table(
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 868, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 906, in _do_insert
return manager._insert(
File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1270, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: UNIQUE constraint failed: documents_document.checksum
[2021-12-18 16:12:07,492] [DEBUG] [paperless.parsing.tesseract] Deleting directory /tmp/paperless/paperless-bz81_8u1
[2021-12-18 16:12:07,647] [ERROR] [paperless.consumer] Cannot consume /usr/src/paperless/src/../consume/20211218_170846.pdf: File not found.
[2021-12-18 16:12:07,975] [ERROR] [paperless.consumer] Cannot consume /usr/src/paperless/src/../consume/20211218_170846.pdf: File not found.
[2021-12-18 16:12:08,484] [ERROR] [paperless.consumer] Cannot consume /usr/src/paperless/src/../consume/20211218_170846.pdf: File not found.
[2021-12-18 16:12:08,993] [ERROR] [paperless.consumer] Cannot consume /usr/src/paperless/src/../consume/20211218_170846.pdf: File not found.
[2021-12-18 16:12:09,501] [ERROR] [paperless.consumer] Cannot consume /usr/src/paperless/src/../consume/20211218_170846.pdf: File not found.
[2021-12-18 16:12:10,004] [ERROR] [paperless.consumer] Cannot consume /usr/src/paperless/src/../consume/20211218_170846.pdf: File not found.
The file is deleted properly by the consume job from the share.
What could be the reason for this to happen? Did anybody else see this behaviour?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following setup. Paperless-ng is on a Synology DiskStation where I created a shared folder for the document consumption.
I mounted this folder on a Linux laptop and I am scanning via a bash script.
After scanning to a temporary folder, the script does a
"mv $TEMP_DIR/output.pdf $OUTPUT_NAME"
Where $OUTPUT_NAME is on the NFS folder.
Consumption by paperless-ng it basically works, but it seems to try to consume the same file lots of times:
The file is deleted properly by the consume job from the share.
What could be the reason for this to happen? Did anybody else see this behaviour?
Beta Was this translation helpful? Give feedback.
All reactions