Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. for f in sftp.listdir_attr(remotePath):
  2. files.append(f.filename)
  3. print("Found: {}".format(f.filename))
  4.  
  5. print("Found a total of: ", len(files), " files in the list.")
  6.  
  7. for filename in files:
  8. a = remotePath + filename
  9. b = local + filename
  10. print(a)
  11. print(b)
  12. sftp.get(a, b, callback = None)
  13. print(ssh.get_transport().is_active())
  14. time.sleep(5)
  15.  
  16. Traceback (most recent call last):
  17. File "getFilenamesRecurringly.py", line 74, in <module>
  18. connectToSSH()
  19. File "getFilenamesRecurringly.py", line 42, in connectToSSH
  20. sftp.get(a, b, callback = None)
  21. File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 721, in get
  22. size = self.getfo(remotepath, fl, callback)
  23. File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 699, in getfo
  24. reader=fr, writer=fl, file_size=file_size, callback=callback
  25. File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 598, in _transfer_with_callback
  26. data = reader.read(32768)
  27. File "/usr/lib/python3/dist-packages/paramiko/file.py", line 211, in read
  28. new_data = self._read(read_size)
  29. File "/usr/lib/python3/dist-packages/paramiko/sftp_file.py", line 165, in _read
  30. data = self._read_prefetch(size)
  31. File "/usr/lib/python3/dist-packages/paramiko/sftp_file.py", line 146, in _read_prefetch
  32. self._check_exception()
  33. File "/usr/lib/python3/dist-packages/paramiko/sftp_file.py", line 519, in _check_exception
  34. raise x
  35. File "/usr/lib/python3/dist-packages/paramiko/sftp_file.py", line 496, in _async_response
  36. self.sftp._convert_status(msg)
  37. File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 811, in _convert_status
  38. raise IOError(text)
  39. OSError: Failure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement