Comments (6)
If you scan the file somewhere else and move it into the consumption folder afterwards, does that work? That would mean the consumer is trying to read the file while its still being written, resulting in the error about no pages in the PDF.
from paperless-ng.
It's not consuming any PDF anymore (not even new ones) now. I also restarted the containers just to be sure. The following exception occurs:
`tuple index out of range : Traceback (most recent call last):
File "/usr/src/paperless/src/documents/consumer.py", line 173, in try_consume_file
classifier=classifier
File "/usr/local/lib/python3.7/site-packages/django/dispatch/dispatcher.py", line 179, in send
for receiver in self._live_receivers(sender)
File "/usr/local/lib/python3.7/site-packages/django/dispatch/dispatcher.py", line 179, in
for receiver in self._live_receivers(sender)
File "/usr/src/paperless/src/documents/signals/handlers.py", line 127, in set_tags
matched_tags = matching.match_tags(document.content, classifier)
File "/usr/src/paperless/src/documents/matching.py", line 36, in match_tags
predicted_tag_ids = classifier.predict_tags(document_content)
File "/usr/src/paperless/src/documents/classifier.py", line 224, in predict_tags
tags_ids = self.tags_binarizer.inverse_transform(y)[0]
File "/usr/local/lib/python3.7/site-packages/sklearn/preprocessing/label.py", line 1017, in inverse_transform
if yt.shape[1] != len(self.classes):
IndexError: tuple index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django_q/cluster.py", line 436, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/src/paperless/src/documents/tasks.py", line 68, in consume_file
override_tag_ids=override_tag_ids)
File "/usr/src/paperless/src/documents/consumer.py", line 187, in try_consume_file
raise ConsumerError(e)
documents.consumer.ConsumerError: tuple index out of range`
from paperless-ng.
If you scan the file somewhere else and move it into the consumption folder afterwards, does that work? That would mean the consumer is trying to read the file while its still being written, resulting in the error about no pages in the PDF.
This is actually a pretty common issue when using watchdog as it does not (and will not) expose close_write events (gorakhargosh/watchdog#184). Especially with larger files (in my case from a Brother document scanner) one will run into this with almost every document.
It's not consuming any PDF anymore (not even new ones) now. I also restarted the containers just to be sure. The following exception occurs:
That's probably unrelated, I just created #47 for that.
from paperless-ng.
This is actually a pretty common issue when using watchdog as it does not (and will not) expose close_write events (gorakhargosh/watchdog#184). Especially with larger files (in my case from a Brother document scanner) one will run into this with almost every document.
@jayme-github, how did you solve this? I am running a while loop, checking if file_size still increases. It is still prone to errors as sometimes (large documents or network issues) my scanner apparently caches more, most of the time less. I guess there are smarter ways? :-)
from paperless-ng.
@jayme-github, how did you solve this? I am running a while loop, checking if file_size still increases. It is still prone to errors as sometimes (large documents or network issues) my scanner apparently caches more, most of the time less. I guess there are smarter ways? :-)
I switched to inotify ;-)
from paperless-ng.
Hmmm and then just use close_write? Damn, I should use that instead of create/move, too
from paperless-ng.
Related Issues (20)
- [Gitpod] Integration
- [BUG] Redis - Authentication required Unraid Docker HOT 1
- [Feature] Add WebSocket Token/Basic Authentication
- [Other] Reference to paperless-ngx in docs
- [Other] Google has ended the support for "less secure apps" HOT 1
- [Other] Each User own Documents HOT 1
- [Other] log spamming error and "Failed to get link config: No such device" errors on Raspberry PI4 docker
- [Feature] Restart Paperless NG in Browser
- PermissionError: [Errno 13] Permission denied: '/config/log'
- Run document_retagger only for certain tags
- [BUG] pdfminer defaults cause excessive whitespaces in extracted text
- [BUG] Unsupported mime type application/csv - documents.consumer.ConsumerError
- [BUG] Downloaded filenames don't support Unicode HOT 3
- [Other] Resolution of jpg reduced, recommended workflow? HOT 1
- [BUG] Stale file handle HOT 3
- [BUG] Sorting tags by color does not work HOT 2
- Hardware requirements HOT 1
- [BUG] mail_fetcher throws UserWarning: seen method are deprecated and will be removed soon HOT 1
- [Other] Can't scan Gmail sent items HOT 1
- docker-compse results in ApplyLayer error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paperless-ng.