Unstructured-IO / Unstructured-IO/unstructured-api

error processing pdf file - cryptography>=3.1 is required for AES algorithm

Open
#473 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
951
Forks
192
Avg merge
7d 8h
Merged PRs (30d)
2

Description

During the processing of a pdf file, this exception is raised
File "/usr/local/lib/python3.11/site-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

Environment:

  • unstructured-api v0.0.79 hosted on my VM, called via Langchain API

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the traceback in pypdf/_crypt_providers/_fallback.py at line 69 and review how the unstructured-api v0.0.79 environment provides cryptography when processing encrypted PDFs. Reproduce the AES PDF failure through the Langchain API, then verify that PDF processing succeeds without the dependency error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.