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

TypeError in connection exception handling code in 1.16.0 #615

nchammas opened this Issue Nov 7, 2015 · 3 comments


None yet
3 participants

nchammas commented Nov 7, 2015

I'm seeing this problem in 1.16.0 but not 1.15.4. I'm running Python 3.5.0 on OS X.

I'm trying to connect to a host as it comes up and am getting this failure:

Traceback (most recent call last):
  File "", line 714, in get_ssh_client
  File ".../venv/lib/python3.5/site-packages/paramiko/", line 311, in connect
    raise NoValidConnectionsError(errors)
  File ".../venv/lib/python3.5/site-packages/paramiko/", line 166, in __init__
    body = ', '.join([x[0] for x in addrs[:-1]])
TypeError: 'dict_keys' object is not subscriptable

This error seems to refer to this line. Looking at the history of and, I'm guessing this problem was introduced as part of this commit.

I'm willing to track this down and provide a patch if you can give me a pointer. Perhaps _families_and_addresses() is not behaving as expected?


This comment has been minimized.

edk0 commented Nov 7, 2015

I don't have a good way to test this but I believe the bug is on the previous line :) in python 3 dict.keys returns a view not a sequence; addr needs to be list(errors.keys())


This comment has been minimized.

nchammas commented Nov 7, 2015

Oh, you're right. The traceback even gives it away. :derp:


This comment has been minimized.


bitprophet commented Nov 9, 2015

Rollin' into the PR, thanks @nchammas / @edk0!

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