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

AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' #93

Open
AvatarBhola opened this issue Jan 19, 2023 · 2 comments

Comments

@AvatarBhola
Copy link

When I tried installing Pyas2 I keep getting this error.

File "/django_pyas2/manage.py", line 22, in
main()
File "/django_pyas2/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 395, in execute
django.setup()
File "/usr/local/lib/python3.7/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.7/site-packages/pyas2/models.py", line 16, in
from pyas2lib import (
File "/usr/local/lib/python3.7/site-packages/pyas2lib/init.py", line 7, in
from pyas2lib.as2 import Mdn
File "/usr/local/lib/python3.7/site-packages/pyas2lib/as2.py", line 14, in
from pyas2lib.cms import (
File "/usr/local/lib/python3.7/site-packages/pyas2lib/cms.py", line 17, in
from pyas2lib.utils import normalize_digest_alg
File "/usr/local/lib/python3.7/site-packages/pyas2lib/utils.py", line 13, in
from OpenSSL import crypto
File "/usr/local/lib/python3.7/site-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py", line 3279, in
_lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

@Tlodder
Copy link

Tlodder commented Jan 27, 2023

Downgrading cryptography with pip install cryptography==38.0.4 fixed this for me.

@zzx-tell-me
Copy link

Downgrading cryptography with pip install cryptography==38.0.4 fixed this for me.

thank you

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

No branches or pull requests

3 participants