Skip to Content
Menu
This question has been flagged
8 Replies
49332 Views

Hello,

After creating a new staging branch, I am not able to update the modules or even start the branch, getting  the below error:

Original exception was:

Traceback (most recent call last):

File "/home/odoo/src/odoo/odoo-bin", line 5, in

import odoo

File "/home/odoo/src/odoo/odoo/__init__.py", line 132, in

from . import cli

File "/home/odoo/src/odoo/odoo/cli/__init__.py", line 10, in

from . import deploy

File "/home/odoo/src/odoo/odoo/cli/deploy.py", line 6, in

import requests

File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in

from urllib3.contrib import pyopenssl

File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in

import OpenSSL.SSL

File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in

from OpenSSL import crypto, SSL

File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in

class X509StoreFlags(object):

File "/usr/lib/python3/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'

Avatar
Discard

"Having error on odoo sh" is not a question. I have edited your post to make the title a question.
In the future, please consider using a Question that can make it clear what you ask without requiring people to open your post, as this will often increase the chances people will respond and make everything clearer for others looking for the same answer.
With many subjects posted, not everyone wants to open a post to find out what the question is.
See also https://www.odoo.com/forum/help-1/meta-why-do-some-questions-get-answers-and-others-do-not-25620

Hi, I'm having the same problem, please can you help if you found a solution ?

Best Answer

Found the solution finally. The problem is with cryptography and pyopenssl libraries.
change requirements.txt as:

go to terminal and:

`pip uninstall pyopenssl`

`pip install pyopenssl==22.0.0`

`pip uninstall cryptography`

`pip install cryptography==37.0.0`

 Edit your answer Comment ShareMore 

Avatar
Discard

Thanks a lot...you helped me a lot

You saved me some much hassles, thanks buddy!

Thanks ....

Best Answer

It is solved for me, pyopenssl needs to be updated on the stage using the shell.

I tried version 22.0.0 and worked;

use pip3 install pyopenssl==22.0.0

then push an empty commit to the branch

pyopenssl==22.0.0 # AFTER

pyopenssl==22.0.0 # AFTER

Avatar
Discard
Best Answer

How can I install a separate package for python3.6?

Avatar
Discard
Best Answer

vhj nnbn 

Avatar
Discard
Best Answer

Ensure that your OpenSSL library is up-to-date. You might be encountering an issue related to an older version of the library. You can update OpenSSL using your package manager or by downloading the latest version from the official OpenSSL website.

Avatar
Discard
Best Answer

The error message "AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'" indicates that the pyopenssl library used by your Odoo instance is outdated and missing the required attribute. This issue often occurs when creating a new staging branch in Odoo.

Avatar
Discard

Here are some ways to fix this error:

1. Update pyopenssl:

Using pip:
Open a terminal window.
Run the following command: pip install pyopenssl --upgrade
This will update the pyopenssl library to the latest version.
Using Odoo shell:
Open Odoo shell.
Run the following command: python3 -m pip install pyopenssl --upgrade
2. Update OpenSSL:

Occasionally, the error might arise due to an outdated OpenSSL version.
Update OpenSSL to the latest version available for your system.
This might involve using your package manager or downloading the latest version directly from the OpenSSL website (https://www.openssl.org/source/).
Link: https://basketballstarsunblocked.io

Best Answer

Thanks for the answer

Avatar
Discard

It's really useful for my site https://fnafgames.io

Best Answer

In ma case

I just comment the line :

class X509StoreFlags(object):
"""
Flags for X509 verification, used to change the behavior of
:class:`X509Store`.

See `OpenSSL Verification Flags`_ for details.

.. _OpenSSL Verification Flags:
https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html
"""
CRL_CHECK = _lib.X509_V_FLAG_CRL_CHECK
CRL_CHECK_ALL = _lib.X509_V_FLAG_CRL_CHECK_ALL
IGNORE_CRITICAL = _lib.X509_V_FLAG_IGNORE_CRITICAL
X509_STRICT = _lib.X509_V_FLAG_X509_STRICT
ALLOW_PROXY_CERTS = _lib.X509_V_FLAG_ALLOW_PROXY_CERTS
POLICY_CHECK = _lib.X509_V_FLAG_POLICY_CHECK
EXPLICIT_POLICY = _lib.X509_V_FLAG_EXPLICIT_POLICY
INHIBIT_MAP = _lib.X509_V_FLAG_INHIBIT_MAP
NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
CHECK_SS_SIGNATURE = _lib.X509_V_FLAG_CHECK_SS_SIGNATURE
#CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK


Avatar
Discard
Related Posts Replies Views Activity
0
Dec 24
753
ODOO.sh Solved
2
Oct 24
12191
1
Sep 24
1173
1
May 24
3101
1
May 25
3756