gsutil: rsync error on Windows when using -r

gsutil version: 4.44 on vanilla GCE Windows Server 2016

This problem seems to be related to non-ascii filenames when using the -r operator.

Without the -r option it works as expected

mkdir repro
echo > repro/Æ.txt
gsutil rsync ./repro gs://bucket/test/

Output:

Building synchronization state...
Starting synchronization...
Copying file://.\repro\Æ.txt [Content-Type=text/plain]...
/ [1 files][   13.0 B/   13.0 B]
Operation completed over 1 objects/13.0 B.

Adding the -r option to the command above throws an exception:

gsutil rsync -r ./repro gs://bucket/test/
Building synchronization state...
Caught non-retryable exception while listing file://.\repro: 'utf8' codec can't decode byte 0xc6 in position 0: invalid continuation byte
CommandException: Caught non-retryable exception - aborting rsync

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 17 (5 by maintainers)

Most upvoted comments

I my case (running on FreeBSD) the fix was to set env var LANG:

export LANG=en_GB.UTF-8