Having issues to delete a file in sftp server, if I use python script - erroring with hostkey.
If we use winscp - fails if the file doesnt exist.
Appreciate any help on this.
Thank you
Not really seeing this an Alteryx issue. Are you using Paramiko with Python? What kind of error are you getting? Are you running Python locally? This can be an encoding issue where a private key generated on windows has issues on linux and vice versa.
Thans for your response.
I tried pysftp, giving error as Info: Python (1): Error: No hostkey for host sftp://st1.aetna.com found.
Any solution for the hostkey, some reason, I am not finding the hostkey on the machine .. not sure why.
Appericate any assistance with this.
Using Paramiko was not successful either, let me try again and get back.
I am basically wanting to delete the file whether it exists or not but getting error if the file doesn't exist . Not sure how to proceed
Tried 2 >dev/null,
exit 0 and nothing seem to work.
I tried using Paramiko as well, getting the error 'Info: Python (1): An error occurred: [Errno 11001] getaddrinfo failed' ,
but I am able to use bat file and winscp to connect and remove the file, Only issue is, the bat command fails if the file doesn't exist maing the workflow fail - any way to proceed with this.
tbh --- this sounds like your paramiko script is wrong. I'd use paramiko. I'd look into why it wasn't working in vscode. I'd develop there. I'd then transfer to alteryx. I'd focus on things like encoding of the RSA key ---> and reading in files in python.