This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sandeep
Recipients Sandeep
Date 2020-03-11.00:07:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
   We have requirement where we need to get file from client path and then upload the same to vendor directory path. I am not able to upload the file to vendor directory path , however when I tried to use the WINSCP it worked fine. So I thought of checking with Gurus what is wrong I am doing in my script. Appreciate your input.
I will attach my script. Here is what I am doing.

Step1. Clear the client directory path
Step2. Make a call to HVAC Vault to get the username and password for client and vendor server
Step3. Use the username and password to establish connection using pysftp for client. 
Step4. Store the file in local path.
Step5. Segregate the file into different path based on file type
Step6  Establish a connection to vendor and copy the file to vendor.
Step7  Close the client and Vendor connection

Please see the file attached.

Also below is the error which I am getting

ERROR:root:Error in getting the file from EBS Outbound Server
Traceback (most recent call last):
  File "", line 191, in file_transfer
    vendor.put(src_file, dst_file)
  File "/d01/python3/lib64/python3.6/site-packages/pysftp/", line 364, in put
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 759, in put
    return self.putfo(fl, remotepath, file_size, callback, confirm)
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 720, in putfo
    s = self.stat(remotepath)
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 493, in stat
    t, msg = self._request(CMD_STAT, path)
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 813, in _request
    return self._read_response(num)
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 865, in _read_response
  File "/d01/python3/lib64/python3.6/site-packages/paramiko/", line 894, in _convert_status
    raise IOError(errno.ENOENT, text)
FileNotFoundError: [Errno 2] /custom/OWO/ECE_OWO_20200303_143895.dat
Date User Action Args
2020-03-11 00:07:35Sandeepsetrecipients: + Sandeep
2020-03-11 00:07:35Sandeepsetmessageid: <>
2020-03-11 00:07:35Sandeeplinkissue39928 messages
2020-03-11 00:07:34Sandeepcreate