-
Notifications
You must be signed in to change notification settings - Fork 75
ssh2.session.Session.userauth_publickey_frommemory() - TypeError: object of type 'NoneType' has no len() #86
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
Comments
Cleaned up the sample code a bit. |
@PhenomPBG the bug remains. #90 doesn't fix it either. I've made a new PR that should fix it. |
Thanks! |
This comment was marked as spam.
This comment was marked as spam.
Add enums to clean up any symbols from libssh2 and make interacting with them much easier to do. Add additional unit tests for ParallelSSH#86
This comment was marked as spam.
This comment was marked as spam.
@Red-M Will your fork become the version of |
This comment was marked as spam.
This comment was marked as spam.
There's another problem with my patch: It doesn't compile under Python 3.7 and higher because the C source files were built with the wrong version of Cython (but if I upgrade and generate the C files again, they'll be incompatible with Python 3.6 and below. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@Red-M Reading the code for #90 it looks like this bug should be fixed there. I'm not sure why I still saw it when I tested manually. Probably because of the bug in Pip I found that affects the use of Git repos from requirements.txt. There's a nonzero chance I was still running the version of ssh2-python from PyPI. |
still experiencing this issue. On a side note, if I use the same key and auth from file, it works. Same error thrown as above poster: File "ssh2/session.pyx", line 237, in ssh2.session.Session.userauth_publickey_frommemory Private key provided |
Add enums to clean up any symbols from libssh2 and make interacting with them much easier to do. Add additional unit tests for ParallelSSH#86
A workaround that seems to work for me is to set the publickeyfiledata to an empty bytestring ( |
Uh oh!
There was an error while loading. Please reload this page.
Last line from stack trace:
File "ssh2/session.pyx", line 240, in ssh2.session.Session.userauth_publickey_frommemory
TypeError: object of type 'NoneType' has no len()
Seems like the optional argument publickeyfiledata defaults to None, but its len() is always checked anyway.
Tested on both 0.17 and 0.18 with Python 3.7.1 on CentOS 7.
The text was updated successfully, but these errors were encountered: