mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 08:37:19 +01:00
Working arround current TIKA Library Bugs - lint
This commit is contained in:
parent
d875be60d4
commit
56fcb3fee1
1 changed files with 2 additions and 5 deletions
|
|
@ -1,9 +1,6 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import array
|
||||
|
||||
import dateutil.parser
|
||||
import httpx
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
|
|
@ -56,7 +53,7 @@ class TikaDocumentParser(DocumentParser):
|
|||
|
||||
try:
|
||||
with TikaClient(tika_url=settings.TIKA_ENDPOINT) as client:
|
||||
with open(document_path, 'rb') as f:
|
||||
with open(document_path, "rb") as f:
|
||||
content = f.read()
|
||||
parsed = client.tika.as_text.from_buffer(content, mime_type)
|
||||
except Exception as err:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue