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: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_EVP_PKEY_get_set_tls_encodedpoint' #12

Closed
Germey opened this issue Jan 19, 2018 · 4 comments

Comments

@Germey
Copy link
Member

Germey commented Jan 19, 2018

$ gerapy init
$ cd gerapy/
$ ls
projects
$ gerapy migrate
Traceback (most recent call last):
File "/home/datacrawl/.local/bin/gerapy", line 11, in
sys.exit(cmd())
File "/home/datacrawl/.local/lib/python3.5/site-packages/gerapy/cmd/init.py", line 27, in cmd
server()
File "/home/datacrawl/.local/lib/python3.5/site-packages/gerapy/cmd/server.py", line 6, in server
manage()
File "/home/datacrawl/.local/lib/python3.5/site-packages/gerapy/server/manage.py", line 23, in manage
execute_from_command_line(sys.argv)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/init.py", line 371, in execute_from_command_line
utility.execute()
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/init.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/base.py", line 332, in execute
self.check()
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/base.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 58, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/management/base.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/checks/registry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/checks/urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/core/checks/urls.py", line 23, in check_resolver
return check_method()
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/urls/resolvers.py", line 397, in check
for pattern in self.url_patterns:
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/utils/functional.py", line 36, in get
res = instance.dict[self.name] = self.func(instance)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/urls/resolvers.py", line 536, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/utils/functional.py", line 36, in get
res = instance.dict[self.name] = self.func(instance)
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/urls/resolvers.py", line 529, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 673, in _load_unlocked
File "", line 665, in exec_module
File "", line 222, in _call_with_frames_removed
File "/home/datacrawl/.local/lib/python3.5/site-packages/gerapy/server/server/urls.py", line 21, in
url(r'^', include('gerapy.server.core.urls')),
File "/home/datacrawl/.local/lib/python3.5/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 673, in _load_unlocked
File "", line 665, in exec_module
File "", line 222, in _call_with_frames_removed
File "/home/datacrawl/.local/lib/python3.5/site-packages/gerapy/server/core/urls.py", line 2, in
from . import views
File "/home/datacrawl/.local/lib/python3.5/site-packages/gerapy/server/core/views.py", line 1, in
import json, os, requests, time, pytz, pymongo, string
File "/home/datacrawl/.local/lib/python3.5/site-packages/requests/init.py", line 84, in
from urllib3.contrib import pyopenssl
File "/home/datacrawl/.local/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 46, in
import OpenSSL.SSL
File "/home/datacrawl/.local/lib/python3.5/site-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/home/datacrawl/.local/lib/python3.5/site-packages/OpenSSL/crypto.py", line 16, in
from OpenSSL._util import (
File "/home/datacrawl/.local/lib/python3.5/site-packages/OpenSSL/_util.py", line 6, in
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/home/datacrawl/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 156, in
Binding.init_static_locks()
File "/home/datacrawl/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 137, in init_static_locks
cls._ensure_ffi_initialized()
File "/home/datacrawl/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 124, in _ensure_ffi_initialized
cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES)
File "/home/datacrawl/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 84, in build_conditional_library
if not getattr(lib, condition):
AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_EVP_PKEY_get_set_tls_encodedpoint'

@Germey
Copy link
Member Author

Germey commented Jan 19, 2018

$ pip3 list
adslproxy (1.0.0)
aiohttp (2.2.5)
appdirs (1.4.3)
asn1crypto (0.24.0)
async-timeout (1.3.0)
attrs (17.1.0)
Automat (0.6.0)
azure-common (1.1.6)
azure-nspkg (2.0.0)
azure-storage (0.34.2)
blinker (1.3)
certifi (2018.1.18)
cffi (1.11.4)
chardet (3.0.4)
click (6.7)
cloud-init (0.7.9)
command-not-found (0.3)
configobj (5.0.6)
constantly (15.1.0)
cryptography (1.8.1)
cssselect (1.0.3)
Django (1.11.3)
django-cors-headers (2.1.0)
docopt (0.6.2)
Flask (0.12.2)
Flask-Login (0.4.0)
gerapy (0.6.6)
hyperlink (17.3.1)
idna (2.5)
incremental (17.5.0)
itsdangerous (0.24)
Jinja2 (2.10)
jsonpatch (1.10)
jsonpointer (1.9)
language-selector (0.1)
lxml (3.7.3)
MarkupSafe (1.0)
multidict (3.1.3)
oauthlib (1.0.3)
olefile (0.44)
packaging (16.8)
parsel (1.3.1)
Pillow (4.1.1)
pip (8.1.1)
prettytable (0.7.2)
py2neo (3.1.2)
pyasn1 (0.2.3)
pyasn1-modules (0.0.8)
pycparser (2.18)
pycrypto (2.6.1)
pycurl (7.43.0)
PyDispatcher (2.0.5)
pygobject (3.20.0)
PyJWT (1.3.0)
pymongo (3.6.0)
PyMySQL (0.8.0)
pyOpenSSL (17.0.0)
pyparsing (2.2.0)
pyquery (1.2.17)
pyserial (3.0.1)
pyspider (0.3.8)
python-apt (1.1.0b1)
python-dateutil (2.6.0)
python-debian (0.1.27)
python-scrapyd-api (2.0.1)
python-systemd (231)
pytz (2017.2)
PyYAML (3.11)
qiniu (7.1.6)
queuelib (1.4.2)
redis (2.10.5)
requests (2.14.2)
Scrapy (1.4.0)
scrapy-redis (0.6.8)
scrapy-splash (0.7.2)
scrapyd (1.2.0)
selenium (3.5.0)
service-identity (16.0.0)
setuptools (35.0.2)
six (1.10.0)
ssh-import-id (5.5)
tornado (4.5.1)
Twisted (17.1.0)
u-msgpack-python (2.4.1)
ufw (0.35)
unattended-upgrades (0.1)
urllib3 (1.21.1)
w3lib (1.17.0)
WALinuxAgent (2.2.9)
Werkzeug (0.12.2)
wheel (0.29.0)
yarl (0.12.0)
zope.interface (4.4.1)

@Germey
Copy link
Member Author

Germey commented Jan 19, 2018

$ cat /proc/version
Linux version 4.4.0-78-generic (buildd@lgw01-11) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017

@Germey
Copy link
Member Author

Germey commented Jan 19, 2018

Remove cryptography and reinstall version>=2.1.1:

pip3 uninstall cryptography
pip3 install cryptography>=2.1.1

@Germey Germey closed this as completed Jan 19, 2018
@Allan-Nava
Copy link

I got this error:


File "/home/ies/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 85, in build_conditional_library
    if not getattr(lib, condition):
AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_PSK'

@Germey Germey reopened this May 31, 2018
@Germey Germey closed this as completed Nov 20, 2019
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

2 participants