Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypdf.errors.DependencyError: cryptography>=3.1 is required for AES algorithm #33

Open
xp9477 opened this issue Feb 6, 2024 · 2 comments
Labels

Comments

@xp9477
Copy link

xp9477 commented Feb 6, 2024

release中最新的win版本写入报错
pypdf.errors.DependencyError: cryptography>=3.1 is required for AES algorithm
2024-02-07 00:06:16,494 - CRITICAL - DependencyError: cryptography>=3.1 is required for AES algorithm:
Traceback (most recent call last):
File "src\gui\main.py", line 281, in write_tree_to_pdf
File "src\gui\main.py", line 288, in dict_to_pdf
File "src\pdf\bookmark.py", line 35, in add_bookmark
File "src\pdf\api.py", line 46, in init
File "pypdf_writer.py", line 2946, in append
File "pypdf_utils.py", line 486, in wrapper
File "pypdf_writer.py", line 3027, in merge
File "pypdf_writer.py", line 419, in add_page
File "pypdf_writer.py", line 332, in _add_page
File "pypdf\generic_data_structures.py", line 199, in clone
File "pypdf\generic_data_structures.py", line 310, in _clone
File "pypdf\generic_data_structures.py", line 116, in clone
File "pypdf\generic_base.py", line 292, in clone
File "pypdf\generic_base.py", line 312, in get_object
File "pypdf_reader.py", line 1417, in get_object
File "pypdf_encryption.py", line 850, in decrypt_object
File "pypdf_encryption.py", line 99, in decrypt_object
File "pypdf_crypt_providers_fallback.py", line 69, in decrypt
pypdf.errors.DependencyError: cryptography>=3.1 is required for AES algorithm

源码运行没问题

@chroming chroming added the bug label Feb 14, 2024
@chroming
Copy link
Owner

chroming commented Feb 15, 2024

本地未复现此问题,不过我根据pypdf文档 修改了依赖包以支持AES加密的pdf, 有空可以试下有没有解决这个问题:
https://github.com/chroming/pdfdir/releases/tag/v0.3.0-beta20

@DetErika
Copy link

同问题,可以检查pdf文件能否被允许写入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants