riptano / ccm

A script to easily create and destroy an Apache Cassandra cluster on localhost
Apache License 2.0
1.22k stars 303 forks source link

IndexError: list index out of range on Fedora release 37 #750

Open porunov opened 1 year ago

porunov commented 1 year ago

ccm doesn't seems to be working on Fedora 37.

Installation steps: pip install ccm

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: ccm in /home/workenv/.local/lib/python3.11/site-packages (3.1.5)
Requirement already satisfied: pyYaml in /usr/lib64/python3.11/site-packages (from ccm) (6.0)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3.11/site-packages (from ccm) (1.16.0)

Run test: ccm create test -v 4.0.0 -n 3 -s

Traceback (most recent call last):
  File "/home/workenv/.local/bin/ccm", line 107, in <module>
    parser = cmd.get_parser()
             ^^^^^^^^^^^^^^^^
  File "/home/workenv/.local/lib/python3.11/site-packages/ccmlib/cmds/command.py", line 60, in get_parser
    get_remote_usage()
  File "/home/workenv/.local/lib/python3.11/site-packages/ccmlib/remote.py", line 32, in get_remote_usage
    return RemoteOptionsParser().usage()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/workenv/.local/lib/python3.11/site-packages/ccmlib/remote.py", line 497, in usage
    usage = self.parser.format_help().split("optional arguments:")[1]
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
PrathamBhatTech commented 1 year ago

I have the same issue with ubuntu 22.04

ccm create t-c1 -v 3.11.1 -n 3 -s

Traceback (most recent call last):
  File "/usr/local/bin/ccm", line 107, in <module>
    parser = cmd.get_parser()
  File "/usr/local/lib/python3.10/dist-packages/ccmlib/cmds/command.py", line 60, in get_parser
    get_remote_usage()
  File "/usr/local/lib/python3.10/dist-packages/ccmlib/remote.py", line 32, in get_remote_usage
    return RemoteOptionsParser().usage()
  File "/usr/local/lib/python3.10/dist-packages/ccmlib/remote.py", line 497, in usage
    usage = self.parser.format_help().split("optional arguments:")[1]
IndexError: list index out of range
shawngoh87 commented 1 year ago

argparse 3.10 changed "optional arguments" to "options" (this commit). Changing the script locally worked.

Check this PR: https://github.com/python/cpython/pull/23858