I am looking to automate file retrieval from a python program that gets a file from my Raspberry Pi and returns it to my local PC. I have tried SSH, FTP & SCP but can't get any to work and run into connection problems in my Python program. Any one have a quick code snippet. below is the code I think should work but getting an error
- From PI: Raspberry PI Zero W
- Receiving PC: Windows 10 running a pycharm python program
-IDE: Pycharm
NOTE: Connected to same network, ssh, putty, cmd line SCP, remote desktop work to PI but I can't do the same by just running a python program to get a file.
Filename: testfile.jpg Pi: Directory. /home/pi/testfile.jpg
Open to any method to retrieve file as long as it can do it automagically?
Ideas?
Thank you!
Code failing with Cryptography deprecation error
Code won't make simple connection - feel its on my local pC?
from paramiko import SSHClient
from scp import SCPClient
ssh = SSHClient()
ssh.Connect(ipadd.re.ss)
CAN'T GET PAST HERE ERROR BELOW
Error: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding. m.add_string(self.Q_C.public_numbers().encode_point())