https://bz.mercurial-scm.org/show_bug.cgi?id=6455

            Bug ID: 6455
           Summary: TypeError in debuguigetpass
           Product: Mercurial
           Version: 5.6
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzi...@mercurial-scm.org
          Reporter: z...@zash.se
                CC: mercurial-devel@mercurial-scm.org
    Python Version: 3.7

For reasons unknown, I tried a random debug command, got this traceback:

$ HOME=/tmp/emptydir HGPLAIN=y hg debuguigetpass
password: 
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
** Mercurial Distributed SCM (version 5.6)
** Extensions loaded: 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mercurial/commandserver.py", line 499,
in _serverequest
    sv.serve()
  File "/usr/lib/python3/dist-packages/mercurial/commandserver.py", line 403,
in serve
    while self.serveone():
  File "/usr/lib/python3/dist-packages/mercurial/commandserver.py", line 377,
in serveone
    handler(self)
  File "/usr/lib/python3/dist-packages/mercurial/chgserver.py", line 563, in
runcommand
    return super(chgcmdserver, self).runcommand()
  File "/usr/lib/python3/dist-packages/mercurial/commandserver.py", line 358,
in runcommand
    ret = self._dispatchcommand(req) & 255
  File "/usr/lib/python3/dist-packages/mercurial/commandserver.py", line 297,
in _dispatchcommand
    return dispatch.dispatch(req)
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 303, in
dispatch
    ret = _runcatch(req) or 0
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 479, in
_runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 488, in
_callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/lib/python3/dist-packages/mercurial/scmutil.py", line 153, in
callcatch
    return func()
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 469, in
_runcatchfunc
    return _dispatch(req)
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1233, in
_dispatch
    lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 917, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1244, in
_runcommand
    return cmdfunc()
  File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1230, in
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python3/dist-packages/mercurial/util.py", line 1867, in check
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/mercurial/debugcommands.py", line 3790,
in debuguigetpass
    ui.writenoi18n(b'response: %s\n' % r)
TypeError: %b requires a bytes-like object, or an object that implements
__bytes__, not 'str'


In default:d42809b6b10f this happens:

hg$ HOME=/tmp/emptydir HGPLAIN=y python3 ./hg debuguigetpass 
password: 
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
** Mercurial Distributed SCM (version unknown)
** Extensions loaded: 
Traceback (most recent call last):
  File "./hg", line 43, in <module>
    dispatch.run()
  File "/home/zash/src/hg/mercurial/dispatch.py", line 115, in run
    status = dispatch(req)
  File "/home/zash/src/hg/mercurial/dispatch.py", line 266, in dispatch
    ret = _runcatch(req) or 0
  File "/home/zash/src/hg/mercurial/dispatch.py", line 442, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/home/zash/src/hg/mercurial/dispatch.py", line 451, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/home/zash/src/hg/mercurial/scmutil.py", line 155, in callcatch
    return func()
  File "/home/zash/src/hg/mercurial/dispatch.py", line 432, in _runcatchfunc
    return _dispatch(req)
  File "/home/zash/src/hg/mercurial/dispatch.py", line 1229, in _dispatch
    lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
  File "/home/zash/src/hg/mercurial/dispatch.py", line 883, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/zash/src/hg/mercurial/dispatch.py", line 1240, in _runcommand
    return cmdfunc()
  File "/home/zash/src/hg/mercurial/dispatch.py", line 1226, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/home/zash/src/hg/mercurial/util.py", line 1867, in check
    return func(*args, **kwargs)
  File "/home/zash/src/hg/mercurial/debugcommands.py", line 3801, in
debuguigetpass
    r = encoding.strtolocal(r)
  File "/home/zash/src/hg/mercurial/encoding.py", line 248, in unitolocal
    return tolocal(u.encode('utf-8'))
AttributeError: 'bytes' object has no attribute 'encode'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to