jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.37k stars 358 forks source link

[BUG] Stale file handle #1741

Closed kakulukia closed 1 year ago

kakulukia commented 1 year ago

Describe the bug While scanning the consume directory instead of new documents i get failed tasks with the following error:

[Errno 116] Stale file handle: '../consume/20211203_105551_Sonstiges_000465.pdf' : Traceback (most recent call last): File "/opt/paperless/.local/lib/python3.9/site-packages/django_q/cluster.py", line 432, in worker res = f(*task["args"], **task["kwargs"]) File "/opt/paperless/src/documents/tasks.py", line 74, in consume_file document = Consumer().try_consume_file( File "/opt/paperless/src/documents/consumer.py", line 197, in try_consume_file self.pre_check_duplicate() File "/opt/paperless/src/documents/consumer.py", line 92, in pre_check_duplicate with open(self.path, "rb") as f: OSError: [Errno 116] Stale file handle: '../consume/20211203_105551_Sonstiges_000465.pdf'

To Reproduce Steps to reproduce the behavior:

  1. Restart the consumer with some files in the consume directory

Expected behaviour New documents should be added to paperless.

Screenshots When the consumer starts i get entries like those: SCR-20221101-mto Its stopping at that stage with no additional error or so in the frontend.

Webserver logs See task error log above.

Relevant information

The user paperless is the owner of the consume folder which is a SMB share. Im probably going to try to test with a normal folder tomorrow and report if that error persists with this setup.

kakulukia commented 1 year ago

BTW: Adding new files via the frontend works.

slankes commented 1 year ago

paperless-ng is pretty much abandoned. Have a look at https://github.com/paperless-ngx/paperless-ngx for a maintained fork.

kakulukia commented 1 year ago

Thanks!