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
PDF imports fail with "Exception: cryptography>=3.1 is required for AES algorithm"
processing source: files__default: 7999370
Traceback (most recent call last):
File "/app/context_chat_backend/chain/ingest/doc_loader.py", line 133, in decode_source
result = _loader_mapmimetype
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/chain/ingest/doc_loader.py", line 43, in _load_pdf
return '\n\n'.join([page.extract_text().strip() for page in pdf_reader.pages])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/chain/ingest/doc_loader.py", line 43, in
return '\n\n'.join([page.extract_text().strip() for page in pdf_reader.pages])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_page.py", line 2595, in iter
for i in range(len(self)):
^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_page.py", line 2520, in len
return self.length_function()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_doc_common.py", line 351, in get_num_pages
return self.root_object["/Pages"]["/Count"] # type: ignore
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/generic/_data_structures.py", line 477, in getitem
return dict.getitem(self, key).get_object()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/generic/_base.py", line 371, in get_object
return self.pdf.get_object(self)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_reader.py", line 418, in get_object
retval = self._get_object_from_stream(indirect_reference) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_reader.py", line 354, in _get_object_from_stream
obj_stm: EncodedStreamObject = IndirectObject(stmnum, 0, self).get_object() # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/generic/_base.py", line 371, in get_object
return self.pdf.get_object(self)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_reader.py", line 488, in get_object
retval = self._encryption.decrypt_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_encryption.py", line 863, in decrypt_object
return cf.decrypt_object(obj)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_encryption.py", line 99, in decrypt_object
obj._data = self.stm_crypt.decrypt(obj._data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_crypt_providers/_fallback.py", line 69, in decrypt
raise DependencyError(_DEPENDENCY_ERROR_STR)
pypdf.errors.DependencyError: cryptography>=3.1 is required for AES algorithm
ERROR:root:Error decoding source file (files__default: 7999370)
hello, thanks for trying it out again!
Is 7999370 file id a password protected pdf? If yes, we don't support that and probably won't in the future too.
PDF imports fail with "Exception: cryptography>=3.1 is required for AES algorithm"
processing source: files__default: 7999370
Traceback (most recent call last):
File "/app/context_chat_backend/chain/ingest/doc_loader.py", line 133, in decode_source
result = _loader_mapmimetype
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/chain/ingest/doc_loader.py", line 43, in _load_pdf
return '\n\n'.join([page.extract_text().strip() for page in pdf_reader.pages])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/context_chat_backend/chain/ingest/doc_loader.py", line 43, in
return '\n\n'.join([page.extract_text().strip() for page in pdf_reader.pages])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_page.py", line 2595, in iter
for i in range(len(self)):
^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_page.py", line 2520, in len
return self.length_function()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_doc_common.py", line 351, in get_num_pages
return self.root_object["/Pages"]["/Count"] # type: ignore
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/generic/_data_structures.py", line 477, in getitem
return dict.getitem(self, key).get_object()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/generic/_base.py", line 371, in get_object
return self.pdf.get_object(self)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_reader.py", line 418, in get_object
retval = self._get_object_from_stream(indirect_reference) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_reader.py", line 354, in _get_object_from_stream
obj_stm: EncodedStreamObject = IndirectObject(stmnum, 0, self).get_object() # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/generic/_base.py", line 371, in get_object
return self.pdf.get_object(self)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_reader.py", line 488, in get_object
retval = self._encryption.decrypt_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_encryption.py", line 863, in decrypt_object
return cf.decrypt_object(obj)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_encryption.py", line 99, in decrypt_object
obj._data = self.stm_crypt.decrypt(obj._data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pypdf/_crypt_providers/_fallback.py", line 69, in decrypt
raise DependencyError(_DEPENDENCY_ERROR_STR)
pypdf.errors.DependencyError: cryptography>=3.1 is required for AES algorithm
ERROR:root:Error decoding source file (files__default: 7999370)
[Nextcloud Hub 9] (30.0.1)
Nextcloud Assistant Context Chat 4.0.1
context_chat_backend 4.0.1
Remote AppAPI server
The text was updated successfully, but these errors were encountered: