I'm calling the Paramiko sftp_client.put(locapath,remotepath)
method
This is throwing the [Errno 2] File not found error below.
01/07/2020 01:12:03 PM - ERROR - [Errno 2] File not found
Traceback (most recent call last):
File "file_transferTransferFiles.py", line 123, in main
File "paramikosftp_client.py", line 727, in put
File "paramikosftp_client.py", line 689, in putfo
File "paramikosftp_client.py", line 460, in stat
File "paramikosftp_client.py", line 780, in _request
File "paramikosftp_client.py", line 832, in _read_response
File "paramikosftp_client.py", line 861, in _convert_status
Having tried many of the other recommend fixes I found that the error is due to the server having an automatic trigger to move the file immediately to another location upon the file being uploaded.
I've not seen another post relating to this issue and wanted to know if anyone else has fixed this as the SFTP server is owned by a third party and not wanting to change trigger attributes.
The file actually uploads correctly, so I could catch the Exception and ignore the error. But I'd prefer to handle it, if possible.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…