We've been using reviewboard for a few months now. The server is 3.0.15 on 
CentOS7, as is the client.

I am using python 3.6.8 from the IUS repository.

This is the first time I've encountered this error, trying to submit a 
post-commit review on a feature branch before it gets merged into master.

I've seen similar codec related reported but none quite the same as this.
 

$ 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
>>> Repository info: Path: ssh://
[email protected]/v1/repos/ 
<http://[email protected]/v1/repos/ADS-CICD-infrastructure>
xxxx <https://rb.aws.agileanalog.com/api/validation/diffs/>, Base path: , 
Supports changesets: False
>>> Making HTTP GET request to https://rb. 
<https://rb.aws.agileanalog.com/api/>xxxx 
<https://rb.aws.agileanalog.com/api/validation/diffs/>/api/ 
<https://rb.aws.agileanalog.com/api/>
>>> 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
>>> Making HTTP GET request to https://rb.xxxx/api/validation/diffs/ 
<https://rb.aws.agileanalog.com/api/validation/diffs/>
>>> Cached response for HTTP GET https://rb. 
<https://rb.aws.agileanalog.com/api/validation/diffs/>xxxx 
<https://rb.aws.agileanalog.com/api/validation/diffs/>/api/validation/diffs/ 
<https://rb.aws.agileanalog.com/api/validation/diffs/> expired and was 
modified
>>> Making HTTP POST request to https://rb. 
<https://rb.aws.agileanalog.com/api/validation/diffs/>xxxx 
<https://rb.aws.agileanalog.com/api/validation/diffs/>/api/validation/diffs/ 
<https://rb.aws.agileanalog.com/api/validation/diffs/>
>>> 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
    response.info())
  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.  

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/7d4de61f-e2a4-4899-84fd-9815c733b6c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to