PyEZ: 'EntryPoint' object has no attribute 'resolve'

1.2k Views Asked by At

PyEZ user are facing issue with respect to subject line error

from jnpr.junos import Device
>>> dev = Device(host='xxx',user='xxxx',passwd='xxx')
>>> dev.open()
No handlers could be found for logger "ncclient.transport.ssh"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/jnpr/junos/device.py", line 483, in open
    raise cnx_err
jnpr.junos.exception.ConnectError: ConnectError(host: esc-elit-01.dcbg.juniper.net, msg: 'EntryPoint' object has no attribute 'resolve') 
2

There are 2 best solutions below

0
On BEST ANSWER

Install cryptography 1.2.1 using below command

sudo pip install cryptography==1.2.1

or upgrade distribute

sudo pip install -U distribute

Ref:

https://github.com/mozilla/sops/issues/67

https://github.com/ARMmbed/yotta/issues/764

0
On

The "python-pip" package installs an old version of distribute/setuptools that is incompatible with versions of cryptography >= 1.3.

The cryptography library specifies a dependency on setuptools >= 11.3: https://github.com/pyca/cryptography/blob/master/setup.py#L40

However, this requirement isn't getting met because setuptools has been installed by the OS's packaging system rather than by pip. When pip tries to upgrade setuptools, the upgrade fails (but doesn't cause the installation of cryptography to actually fail.)

Running:

sudo pip install -U distribute

Forces setuptools to be upgraded (the distribute package has been renamed to setuptools in later releases). You could also do:

sudo pip install -U setuptools