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' object has no attribute 'Cryptography_HAS_SSL_ST' #8

Open
bzamecnik opened this issue Apr 16, 2019 · 2 comments

Comments

@bzamecnik
Copy link
Collaborator

Apr 16 09:21:29 mlok systemd[1]: Started NVGPU agent.
Apr 16 09:21:29 mlok bash[1327]:  * Serving Flask app "nvgpu.webapp"
Apr 16 09:21:29 mlok bash[1327]:  * Environment: production
Apr 16 09:21:29 mlok bash[1327]:    WARNING: Do not use the development server in a production environment.
Apr 16 09:21:29 mlok bash[1327]:    Use a production WSGI server instead.
Apr 16 09:21:29 mlok bash[1327]:  * Debug mode: off
Apr 16 09:21:29 mlok bash[1327]: Traceback (most recent call last):
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/bin/flask", line 11, in <module>
Apr 16 09:21:29 mlok bash[1327]:     sys.exit(main())
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 894, in main
Apr 16 09:21:29 mlok bash[1327]:     cli.main(args=args, prog_name=name)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 557, in main
Apr 16 09:21:29 mlok bash[1327]:     return super(FlaskGroup, self).main(*args, **kwargs)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
Apr 16 09:21:29 mlok bash[1327]:     rv = self.invoke(ctx)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
Apr 16 09:21:29 mlok bash[1327]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
Apr 16 09:21:29 mlok bash[1327]:     return ctx.invoke(self.callback, **ctx.params)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
Apr 16 09:21:29 mlok bash[1327]:     return callback(*args, **kwargs)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 64, in new_func
Apr 16 09:21:29 mlok bash[1327]:     return ctx.invoke(f, obj, *args, **kwargs)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
Apr 16 09:21:29 mlok bash[1327]:     return callback(*args, **kwargs)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 767, in run_command
Apr 16 09:21:29 mlok bash[1327]:     app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 293, in __init__
Apr 16 09:21:29 mlok bash[1327]:     self._load_unlocked()
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 317, in _load_unlocked
Apr 16 09:21:29 mlok bash[1327]:     self._app = rv = self.loader()
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 372, in load_app
Apr 16 09:21:29 mlok bash[1327]:     app = locate_app(self, import_name, name)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 235, in locate_app
Apr 16 09:21:29 mlok bash[1327]:     __import__(module_name)
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/nvgpu/webapp.py", line 23, in <module>
Apr 16 09:21:29 mlok bash[1327]:     from nvgpu.master import gather_reports, format_reports_to_ansi
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/nvgpu/master.py", line 1, in <module>
Apr 16 09:21:29 mlok bash[1327]:     import requests
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 95, in <module>
Apr 16 09:21:29 mlok bash[1327]:     from urllib3.contrib import pyopenssl
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
Apr 16 09:21:29 mlok bash[1327]:     import OpenSSL.SSL
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/pyOpenSSL-19.0.0-py2.7.egg/OpenSSL/__init__.py", line 8, in <module>
Apr 16 09:21:29 mlok bash[1327]:     from OpenSSL import crypto, SSL
Apr 16 09:21:29 mlok bash[1327]:   File "/usr/local/lib/python2.7/dist-packages/pyOpenSSL-19.0.0-py2.7.egg/OpenSSL/SSL.py", line 194, in <module>
Apr 16 09:21:29 mlok bash[1327]:     if _lib.Cryptography_HAS_SSL_ST:
Apr 16 09:21:29 mlok bash[1327]: AttributeError: 'module' object has no attribute 'Cryptography_HAS_SSL_ST'
@bzamecnik
Copy link
Collaborator Author

Looks like: https://stackoverflow.com/questions/41102299/pip-error-module-object-has-no-attribute-cryptography-has-ssl-st

$ dpkg -l '*python-openssl*'
ii  python-openssl                                                0.15.1-2ubuntu0.2   

$ pip freeze|grep pyOpenSSL
pyOpenSSL==19.0.0

@bzamecnik
Copy link
Collaborator Author

apt-get --auto-remove remove python-openssl

solved the problem

@bzamecnik bzamecnik reopened this Apr 16, 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

1 participant