我试图通过Popen和subprocess.check_call从python运行rsync,得到同样的错误:
subprocess.check_call(['rsync', '-au', '/opt/catflow/EpressCatalog/*', '/Users/pistacchio/dev/epress/catflow/portal/branches/noscript/frontend/static/repo/usr/2/catalogs/2/builds/ipad'])
rsync: link_stat "/opt/catflow/EpressCatalog/*" failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
*** CalledProcessError: Command '['rsync', '-au', '/opt/catflow/EpressCatalog/*', '/Users/pistacchio/dev/epress/catflow/portal/branches/noscript/frontend/static/repo/usr/2/catalogs/2/builds/ipad']' returned non-zero exit status 23
似乎问题是它无法找到(或访问)/opt/catflow/EpressCatalog/*
。它不仅存在,而且从命令行运行它会得到正确的结果。
任何帮助?