0

I want to run scp command in subprocess.Popen(cmd) like

self.p = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, encoding='utf-8')
(self.out, self.err) = self.p.communicate()

but file is being downloaded but it shows cp: cannot stat 'ssh': No such file or directory and return retuncode 1.

How can I get rid of this error?

MisterMiyagi
  • 44,374
  • 10
  • 104
  • 119
Gopal
  • 1
  • This is likely not a problem with Python but with the command you are running. What is ``cmd``? – MisterMiyagi May 15 '20 at 16:34
  • @MisterMiyagi sorry, if I could share my **cmd** but I'm able to bypass the error by **if self.p.returncode==0: time.sleep(1) messagebox.showinfo(title='Success', message="Process Complete!")** – Gopal Jun 27 '20 at 16:09

0 Answers0