You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "test.py", line 94, in <module>
libssh2_upload()
File "test.py", line 92, in libssh2_upload
chan.close()
File "/usr/local/lib/python2.6/dist-packages/pylibssh2-1.0.1-py2.6-linux-x86_64.egg/libssh2/channel.py", line 53, in close
return self._channel.close()
_libssh2.Error: Unable to close the channel.
for x in range(1,21000):
chan.write(str(x)+"\r\n")
I then end up with;
> tail /tmp/lol -n 5
20308
20309
20310
20311
So it seems to be dropping the last chunks of data.. if I increase 21000 to 22000, it will still continue to increase but will drop out at 21311 instead.
If I change this to 5, nothing appears in the file at all;
for x in range(1,5):
chan.write(str(x)+"\r\n")
> ls -lah /tmp/lol
-rwx------ 1 pippaprod pippaprod 0 May 31 15:15 /tmp/lol
I have nearly the same issue on OpenBSD with python 2.7 and libssh2-1.4.3
Though my 238Mb testfile is send and received correctly.
I also get an error code:
_libssh2.Error: Unable to close the channel (error -34).
I used pylibssh2-1.0.3
But, if I install the old version pylibssh2-1.0.0, I do not get an error. That version works fine!!
(1.0.1 gives an error, 1.0.2 I didn't try)
After some searching it turns out there is an error in channel.c line 46:
it should be:
if (rc && rc != LIBSSH2_ERROR_EAGAIN)
That does work. Otherwise, after a succesfull close, it wil try to close again.
Code being used;
Also, the file is corrupt on the other side (md5 mismatch) and the size is very different.
Any ideas?
Thanks
The text was updated successfully, but these errors were encountered: