I'm trying to save a file from a remote server to my local pc. I've tried the following code:
import scp
client = scp.SCPClient("ip", "username", "password")
# and then
client.transfer('remote/file', 'C:\folder')
but doing so I'm getting the following error:
File "C:\Users\localfp\AppData\Local\Programs\Python\Python310\lib\site-packages\scp.py", line 156, in __init__
self.peername = self.transport.getpeername()
AttributeError: 'str' object has no attribute 'getpeername'
can you explain me what is this kind of error and how to fix it?