Comment 4 for bug 718740

Revision history for this message
Martin Packman (gz) wrote :

Traceback (most recent call last):
  File "...\bzrtools\shell.py", line 209, in default
    return (cmd_obj.run_argv_aliases(args, alias_args) or 0)
  File "...\bzrlib\commands.py", line 660, in run_argv_aliases
    args, opts = parse_args(self, argv, alias_argv)
  File "...\bzrlib\commands.py", line 824, in parse_args
    options, args = parser.parse_args(args)
  File "...\lib\optparse.py", line 1277, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "...\lib\optparse.py", line 1321, in _process_args
    self._process_short_opts(rargs, values)
  File "...\lib\optparse.py", line 1428, in _process_short_opts
    option.process(opt, value, values, self)
  File "...\lib\optparse.py", line 709, in process
    return self.take_action(
  File "...\lib\optparse.py", line 728, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "...\bzrlib\option.py", line 241, in _optparse_callback
    v = self.type(value)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 0: ordinal not in range(128)

So, this is a little like bug 563692 in bzr in effect, but with all non-ascii inputs rather than just type=str arguments.

Workaround: prepending 'bzr' to the command that failed bypasses the buggy shell command line parsing.