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

Error on init() for unpickling NoValidConnectionError #617

rschlussel-zz opened this issue Nov 9, 2015 · 1 comment

Error on init() for unpickling NoValidConnectionError #617

rschlussel-zz opened this issue Nov 9, 2015 · 1 comment


Copy link

@rschlussel-zz rschlussel-zz commented Nov 9, 2015

If you try pickling and then unpickling NoValidConnectionError, you get the following exception:
TypeError: __init__() takes exactly 2 arguments (3 given)

It seems to be passing the errno and string with the error message while init expects a dict.

Here is some simple code to reproduce the issue:

from paramiko import ssh_exception.NoValidConnectionsError
import pickle
err = NoValidConnectionsError({'ab': ''})
p = pickle.dumps(err)
unpickled = pickle.loads(p)

A more practical application is for example if you are using the multiprocessing module and a child process raises a NoValidConnectionError.

Copy link

@bitprophet bitprophet commented Apr 24, 2016

Solved in #679.

@bitprophet bitprophet closed this Apr 24, 2016
bitprophet added a commit that referenced this issue Apr 24, 2016
Also re fabric/fabric#1429 but IDK if Github will tickle that repo correctly :D
dkhapun pushed a commit to cyberx-labs/paramiko that referenced this issue Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants