Reputation: 43
I have a gsutil rsync call which works fine from the command line, but when called by subprocess.run returns an stderr of 'CommandException: The rsync command accepts at most 2 arguments.'
I don't find this limitation anywhere in the gsutil documentation.
My args are ['/Users/username/google-cloud-sdk/bin/gsutil', 'rsync', '-CderU', '-x' './[.].$', '/Users/username/Documents/_Projects/Active Projects/myFolder', 'gs://myBucket/myFolder', '2>>', '/Users/username/Library/Logs/gCloud/2016_12_07.log']
When I run my full command through shlex, it comes out as listed above. I have also combined '-CderU' and '-x' into '-CderUx', but receive the same result.
I am running Python 3.5.2 and have the latest version of gsutil under Mac OS 10.11.6.
Any guidance appreciated.
Upvotes: 0
Views: 659
Reputation: 5511
gsutil doesn't (yet) support Python 3.x.x - it currently only supports Python 2.7. So you'll need to use that version of Python. It's documented here, among other places.
Upvotes: 0