command = f"gupload -u ********@qq.com -p password -a 'Running' /home/ubuntu/github/strava-backup/stravabackup/output/activities/2022/*{lastrun}*.fit" result = os.system(command) if result isnot0: wxpusher(result)
得到的输出结果是32512,网上查到是因为执行的命令需要写全目录,就改成了这样
1 2 3 4 5
command = f"/home/ubuntu/.local/bin/gupload -u ********@qq.com -p password -a 'Running' /home/ubuntu/github/strava-backup/stravabackup/output/activiti es/2022/*{lastrun}*.fit" result = os.system(command) if result isnot0: wxpusher(result)