1
Chronos User Discussion / Re: transfer video to computer via code
« on: September 09, 2019, 12:16:30 PM »have you tried ssh1 instead of winscp?
can you edid you known_hosts file and add the required key?
if you're on win10 you can install bash and use native linux tools which might be easier.
@NiNeff thanks for the reply, I managed to solve the issue.
Apparently windows does not automatically add unknown hosts when SSHing (no .ssh host file exists) for security reasons. I added the following parameter to the ParmaikoMachine() initalizer:
Code: [Select]
cam = ParamikoMachine(host=host, user='root', password='', missing_host_policy=paramiko.AutoAddPolicy())
since the default value is set to "None" which rejects any unknown hosts.Furthermore, copying the video introduced another issue, the following line:
Code: [Select]
latest = cam['/bin/ls -t -1 /media/mmcblk1p1']().split()[0]
returns the first index of the standard out which in my case was "System" and caused a (File does not exist) error when attempting to copy the file.Changing it to the following solves the issue:
Code: [Select]
latest = cam['/bin/ls -t -1 /media/mmcblk1p1']().split()[3]
which is the 3rd index of the sorted list. This returned the latest video in my case.Sharing in case anyone encounters similar issues.
Cheers!