Issue #90 resolved

UnicodeDecodeError

Anonymous created an issue

$ cd ~/.hgext/hg-review

$ hg review --web --port 8081 --debug

Then in browser click on changeset and then

Traceback (most recent call last):
  File "/home/user/.hgext/hg-review/bundled/flask/flask/app.py", line 965, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/user/.hgext/hg-review/bundled/flask/flask/app.py", line 955, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/user/.hgext/hg-review/bundled/flask/flask/app.py", line 952, in wsgi_app
    rv = self.dispatch_request()
  File "/home/user/.hgext/hg-review/bundled/flask/flask/app.py", line 754, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/user/.hgext/hg-review/review/web.py", line 183, in changeset
    rcset, rev = _get_revision_or_404(revhash)
  File "/home/user/.hgext/hg-review/review/web.py", line 98, in _get_revision_or_404
    rev = rcset.target[revhash]
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 387, in __getitem__
    return context.changectx(self, changeid)
  File "/usr/lib64/python2.7/site-packages/mercurial/context.py", line 90, in __init__
    self._node = repo.branchtip(changeid)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 652, in branchtip
    raise error.RepoLookupError(_("unknown branch '%s'") % branch)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

$ cat .hgreview

local = .hg/review
remote = /home/user/.hgext/hg-review

Comments (8)

  1. Christophe de Vienne

    I cannot reproduce the error on the hg-review repository. I am able to view any changeset without any problem.

    • what version of mercurial do you use ?
    • does the problem occur on any cset ?
    • your .hgreview content is different from what is currently in hg-review. Did you modify it ?
    • did you try to reproduce on a fresh clone ?
  2. Alexander Stepanenko

    When I had tried do

    env LANG=en_US.UTF-8 hg review --web --port 8081 --debug
    

    no error occurred. My locale is

    $ locale
    LANG=ru_RU.UTF-8
    LC_CTYPE=ru_RU.UTF-8
    LC_NUMERIC="ru_RU.UTF-8"
    LC_TIME="ru_RU.UTF-8"
    LC_COLLATE="ru_RU.UTF-8"
    LC_MONETARY="ru_RU.UTF-8"
    LC_MESSAGES="ru_RU.UTF-8"
    LC_PAPER="ru_RU.UTF-8"
    LC_NAME="ru_RU.UTF-8"
    LC_ADDRESS="ru_RU.UTF-8"
    LC_TELEPHONE="ru_RU.UTF-8"
    LC_MEASUREMENT="ru_RU.UTF-8"
    LC_IDENTIFICATION="ru_RU.UTF-8"
    LC_ALL=
    
  3. Alexander Stepanenko
    • what version of mercurial do you use ?
    hg --version 
    Mercurial Distributed SCM (version 3.0)
    
    • does the problem occur on any cset ?

    Yes.

    • your .hgreview content is different from what is currently in hg-review. Did you modify it ?

    No and no.

    cat .hgreview 
    local = .hg/review
    remote = http://bitbucket.org/sjl/hg-review-review
    
    • did you try to reproduce on a fresh clone ?

    Yes.

  4. Log in to comment