跳至内容
菜单
此问题已终结
4 回复
7330 查看

When installing Odoo 16, I saw the following message in the log file:


WARNING shipping_pg odoo.addons.attachment_indexation.models.ir_attachment: Attachment indexation of PDF documents is unavailable because the 'pdfminer' Python library cannot be found on the system. You may install it from https://pypi.org/project/pdfminer.six/ (e.g. `pip3 install pdfminer.six`)


I then installed pdfminer via pip3 and immediately saw the following error:


File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'



Removing pdfminer does not resolve this, is there a solution?

形象
丢弃
最佳答案

Hi all, I found solution for the above error in Odoo16
When running  'pip3 install pdfminer.six', it auto update new version for library 'cryptography'
Solution:
    - Update version appropriate 'cryptography' 
    - ​In Odoo16,
pip3 install cryptography==3.4.8 (version in file requerements.txt) 

形象
丢弃
最佳答案

I was able to resolve this by upgrading pyOpenSSL:

pip3 install pyOpenSSL --upgrade

In my case on Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-50-generic x86_64) this upgraded the library from version 19.0.0 to 22.1.0. 

You then reinstall pdfminer as instructed.

形象
丢弃
最佳答案

I had the same problem and I found a way to solve this problem that we should use the pdfminer.six version 20211012. The cryptography and pyOpenSSL we use as mentioned in odoo's "requirement.txt" file


pip install pdfminer.six==20211012



形象
丢弃
最佳答案

Hello,

I've same error.

I've uninstall odoo python3-openssl and python3-crytography.

Then can install or uninstall pdfminer.sir or pyOpenssl or crypto.

When i reinstall odoo, even if i've install pip package, python3-openssl and python3-cryptography are reinstalled.

And pdfminer.six is not detected by odoo on start.

I don't understand. 

Python 3.9.1

python3-openssl 20.0.0 python3-cryptography 3.0.0

pyopenssl 23.0.0 or 22.0.1, cryptography 38 or 39 tested.

I'm desappointed.

I can''t launch migration to 16.0

形象
丢弃
相关帖文 回复 查看 活动
3
12月 23
8224
0
11月 23
1656
1
7月 23
2427
1
11月 22
3815
0
3月 17
3119