$ rbt post --debug --bugs-closed DEVOPS-163 --branch DEVOPS-163 master..DEVOPS-163
>>> RBTools 1.0.2
>>> Python 3.6.8 (default, May 2 2019, 20:40:44)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
>>> Running on Linux-3.10.0-957.21.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
>>> Home = /users/paulm
>>> Current directory = /users/paulm/codecommit/ADS-CICD-infrastructure/ci
>>> Command line: rbt post --debug --bugs-closed DEVOPS-163 --branch DEVOPS-163 master..DEVOPS-163
>>> Running: tf vc help
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.DEVOPS-163.merge
>>> Running: git config --get branch.DEVOPS-163.remote
>>> Running: git config --get remote.origin.url
>>> Running: git rev-parse master..DEVOPS-163
>>> Running: git config --get branch.DEVOPS-163.merge
>>> Running: git config --get branch.DEVOPS-163.remote
>>> Running: git branch --remotes
>>> Running: git rev-list edce8a7dd4284d40a57ba59ba7fac62c34b22f16 --not --remotes=origin
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff edce8a7dd4284d40a57ba59ba7fac62c34b22f16..429fbfbd88d9258f17681407afaa119d4cee7773
>>> Generated diff size: 22187 bytes
>>> Got API Error 224 (HTTP code 400): Unexpected error when validating the diff: 'ascii' codec can't decode byte 0xc2 in position 1333: ordinal not in range(128)
>>> Error data: {'stat': 'fail', 'err': {'msg': "Unexpected error when validating the diff: 'ascii' codec can't decode byte 0xc2 in position 1333: ordinal not in range(128)", 'code': 224}}
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 685, in make_request
request.url, body, headers, request.method))
File "/usr/lib/python3.6/site-packages/rbtools/api/cache.py", line 209, in make_request
return self.urlopen(request)
File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 240, in http_response
File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: BAD REQUEST
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/rbtools/commands/post.py", line 867, in main
**validate_kwargs)
File "/usr/lib/python3.6/site-packages/rbtools/api/decorators.py", line 27, in request_method
*args, **kwargs)
File "/usr/lib/python3.6/site-packages/rbtools/api/transport/sync.py", line 77, in execute_request_method
return self._execute_request(request)
File "/usr/lib/python3.6/site-packages/rbtools/api/transport/sync.py", line 86, in _execute_request
rsp = self.server.make_request(request)
File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 687, in make_request
self.process_error(e.code, e.read())
File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 661, in process_error
rsp['err']['msg'])
rbtools.api.errors.BadRequestError: Unexpected error when validating the diff: 'ascii' codec can't decode byte 0xc2 in position 1333: ordinal not in range(128) (HTTP 400, API Error 224)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/bin/rbt", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.6/site-packages/rbtools/commands/main.py", line 120, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "/usr/lib/python3.6/site-packages/rbtools/commands/__init__.py", line 725, in run_from_argv
exit_code = self.main(*args) or 0
File "/usr/lib/python3.6/site-packages/rbtools/commands/post.py", line 875, in main
(msg_prefix, e))
rbtools.commands.CommandError: Error validating diff
Unexpected error when validating the diff: 'ascii' codec can't decode byte 0xc2 in position 1333: ordinal not in range(128) (HTTP 400, API Error 224)
I discovered it's possible to change the encoding on a repository, when logged in as admin, so I tried "utf-8" and "ascii" and it didn't make a difference.