diff --git a/mercurial/wireprotov2server.py b/mercurial/wireprotov2server.py --- a/mercurial/wireprotov2server.py +++ b/mercurial/wireprotov2server.py @@ -319,7 +319,8 @@ except Exception as e: action, meta = reactor.onservererror( outstream, command['requestid'], - _('exception when invoking command: %s') % e) + _('exception when invoking command: %s') % + pycompat.sysbytes(str(e))) if action == 'sendframes': res.setbodygen(meta['framegen'])