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

Workaround broken Twisted conch #1555

Closed
oberstet opened this issue Apr 13, 2019 · 1 comment
Closed

Workaround broken Twisted conch #1555

oberstet opened this issue Apr 13, 2019 · 1 comment

Comments

@oberstet
Copy link
Contributor

2019-04-12T22:34:11+0000 [Controller   6124] Booting node from local configuration [parallel_worker_start=False] .. <crossbar.node.node.Node.boot_from_config>
2019-04-12T22:34:11+0000 [Controller   6124] NodeController.onUserError(): "ModuleNotFoundError: No module named 'bcrypt'"
Traceback (most recent call last):
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/txaio/tx.py", line 429, in as_future
    return maybeDeferred(fun, *args, **kwargs)
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/twisted/internet/defer.py", line 151, in maybeDeferred
    result = f(*args, **kw)
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/crossbar/common/process.py", line 543, in start_manhole
    from twisted.conch.ssh import keys
  File "/home/travis/build/crossbario/crossbar/.tox/py37-cli/lib/python3.7/site-packages/twisted/conch/ssh/keys.py", line 18, in <module>
    import bcrypt
builtins.ModuleNotFoundError: No module named 'bcrypt'
CROSSBAR:NODE_STARTUP_FAILED                

see: https://travis-ci.org/crossbario/crossbar/jobs/519472449

I haven't analyzed why exactly, but Twisted 19.9.2 now requires

  • bcrypt
  • cryptography
  • pyasn1

to be installed explicitly. Doing that makes the import

from twisted.conch.ssh import keys

work again:

oberstet@intel-nuci7:~$ ~/cpy372/bin/python3 -m venv ~/cpy372_5
oberstet@intel-nuci7:~$ source ~/cpy372_5/bin/activate
(cpy372_5) oberstet@intel-nuci7:~$ pip install twisted
Collecting twisted
  Downloading https://files.pythonhosted.org/packages/f8/2b/a80a70f71eb2b86992ffa5aaae41457791ae67faa70927fd16b76127c2b7/Twisted-19.2.0.tar.bz2 (3.1MB)
    100% |████████████████████████████████| 3.1MB 5.8MB/s 
Collecting zope.interface>=4.4.2 (from twisted)
  Using cached https://files.pythonhosted.org/packages/3a/b5/5cbafbe09bbfc242503b0cd9bcf9dee32458b3ca166f6a63cb7b4f465b60/zope.interface-4.6.0-cp37-cp37m-manylinux1_x86_64.whl
Collecting constantly>=15.1 (from twisted)
  Using cached https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
  Using cached https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
  Using cached https://files.pythonhosted.org/packages/a3/86/14c16bb98a5a3542ed8fed5d74fb064a902de3bdd98d6584b34553353c45/Automat-0.7.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted)
  Downloading https://files.pythonhosted.org/packages/7f/91/e916ca10a2de1cb7101a9b24da546fb90ee14629e23160086cf3361c4fb8/hyperlink-19.0.0-py2.py3-none-any.whl
Collecting PyHamcrest>=1.9.0 (from twisted)
  Using cached https://files.pythonhosted.org/packages/9a/d5/d37fd731b7d0e91afcc84577edeccf4638b4f9b82f5ffe2f8b62e2ddc609/PyHamcrest-1.9.0-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from twisted)
  Using cached https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in ./cpy372_5/lib/python3.7/site-packages (from zope.interface>=4.4.2->twisted) (40.6.2)
Collecting six (from Automat>=0.3.0->twisted)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting idna>=2.5 (from hyperlink>=17.1.1->twisted)
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Installing collected packages: zope.interface, constantly, incremental, attrs, six, Automat, idna, hyperlink, PyHamcrest, twisted
  Running setup.py install for twisted ... done
Successfully installed Automat-0.7.0 PyHamcrest-1.9.0 attrs-19.1.0 constantly-15.1.0 hyperlink-19.0.0 idna-2.8 incremental-17.5.0 six-1.12.0 twisted-19.2.0 zope.interface-4.6.0
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(cpy372_5) oberstet@intel-nuci7:~$ which python
/home/oberstet/cpy372_5/bin/python
(cpy372_5) oberstet@intel-nuci7:~$ python
Python 3.7.2 (default, Feb 25 2019, 08:26:41) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.conch.ssh import keys
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oberstet/cpy372_5/lib/python3.7/site-packages/twisted/conch/ssh/keys.py", line 18, in <module>
    import bcrypt
ModuleNotFoundError: No module named 'bcrypt'
>>> 
KeyboardInterrupt
>>> 
(cpy372_5) oberstet@intel-nuci7:~$ pip install bcrypt
Collecting bcrypt
  Using cached https://files.pythonhosted.org/packages/d0/79/79a4d167a31cc206117d9b396926615fa9c1fdbd52017bcced80937ac501/bcrypt-3.1.6-cp34-abi3-manylinux1_x86_64.whl
Requirement already satisfied: six>=1.4.1 in ./cpy372_5/lib/python3.7/site-packages (from bcrypt) (1.12.0)
Collecting cffi>=1.1 (from bcrypt)
  Using cached https://files.pythonhosted.org/packages/a7/3f/2667a1516d935938245bd256b56a2f96d739ac3683e6778380f06c6e4c79/cffi-1.12.2-cp37-cp37m-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.1->bcrypt)
Installing collected packages: pycparser, cffi, bcrypt
Successfully installed bcrypt-3.1.6 cffi-1.12.2 pycparser-2.19
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(cpy372_5) oberstet@intel-nuci7:~$ python
Python 3.7.2 (default, Feb 25 2019, 08:26:41) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.conch.ssh import keys
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oberstet/cpy372_5/lib/python3.7/site-packages/twisted/conch/ssh/keys.py", line 19, in <module>
    from cryptography.exceptions import InvalidSignature
ModuleNotFoundError: No module named 'cryptography'
>>> 
(cpy372_5) oberstet@intel-nuci7:~$ pip install cryptography
Collecting cryptography
  Using cached https://files.pythonhosted.org/packages/5b/12/b0409a94dad366d98a8eee2a77678c7a73aafd8c0e4b835abea634ea3896/cryptography-2.6.1-cp34-abi3-manylinux1_x86_64.whl
Collecting asn1crypto>=0.21.0 (from cryptography)
  Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.4.1 in ./cpy372_5/lib/python3.7/site-packages (from cryptography) (1.12.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./cpy372_5/lib/python3.7/site-packages (from cryptography) (1.12.2)
Requirement already satisfied: pycparser in ./cpy372_5/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
Installing collected packages: asn1crypto, cryptography
Successfully installed asn1crypto-0.24.0 cryptography-2.6.1
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(cpy372_5) oberstet@intel-nuci7:~$ python
Python 3.7.2 (default, Feb 25 2019, 08:26:41) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.conch.ssh import keys
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oberstet/cpy372_5/lib/python3.7/site-packages/twisted/conch/ssh/keys.py", line 37, in <module>
    from pyasn1.error import PyAsn1Error
ModuleNotFoundError: No module named 'pyasn1'
>>> 
(cpy372_5) oberstet@intel-nuci7:~$ pip install pyasn1
Collecting pyasn1
  Using cached https://files.pythonhosted.org/packages/7b/7c/c9386b82a25115cccf1903441bba3cbadcfae7b678a20167347fa8ded34c/pyasn1-0.4.5-py2.py3-none-any.whl
Installing collected packages: pyasn1
Successfully installed pyasn1-0.4.5
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(cpy372_5) oberstet@intel-nuci7:~$ python
Python 3.7.2 (default, Feb 25 2019, 08:26:41) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.conch.ssh import keys
>>> 
KeyboardInterrupt
>>> 
(cpy372_5) oberstet@intel-nuci7:~$ 
@oberstet
Copy link
Contributor Author

oberstet commented Apr 13, 2019

fixed via #1556 by adding bcrypt>=3.1.6 to requirements-min.txt

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

No branches or pull requests

1 participant