B2_Command_Line_Tool
B2_Command_Line_Tool copied to clipboard
argparse.ArgumentError when running on Python 3.11
Running b2 authorize-account
under Python 3.11.0 fails w/ following traceback:
Traceback (most recent call last):
File "/proj/venv311/bin/b2", line 8, in <module>
sys.exit(main())
^^^^^^
File "/proj/venv311/lib/python3.11/site-packages/b2/console_tool.py", line 2986, in main
exit_status = ct.run_command(sys.argv)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/proj/venv311/lib/python3.11/site-packages/b2/console_tool.py", line 2812, in run_command
args = B2.get_parser().parse_args(argv[1:])
^^^^^^^^^^^^^^^
File "/proj/venv311/lib/python3.11/site-packages/b2/console_tool.py", line 551, in get_parser
subcommand.get_parser(subparsers=subparsers, parents=parents, for_docs=for_docs)
File "/proj/venv311/lib/python3.11/site-packages/b2/console_tool.py", line 527, in get_parser
parser = subparsers.add_parser(
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/uninen/.pyenv/versions/3.11.0/lib/python3.11/argparse.py", line 1185, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument command: conflicting subparser: authorize-account
When switching back to 3.10 it works fine.
Ok I know what this is about now but I don't know how to fix it yet. Should have a fix in a few days - please use 3.10 for now.
Any news on this?
Sounds like https://github.com/Backblaze/B2_Command_Line_Tool/pull/835 fixed this, but latest release was last September. New release pretty please? 😃
b2-sdk-python had a longer-than-usual review queue which is down to one PR now. As soon as we release b2sdk, we'll merge in the branches and release the cli.
Fixed with the release of https://github.com/Backblaze/B2_Command_Line_Tool/releases/tag/v3.7.0