Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
porunov opened this issue May 5, 2023 · 2 comments
Open

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

porunov opened this issue May 5, 2023 · 2 comments

Comments

@porunov
Copy link

porunov commented May 5, 2023

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
Copy link

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
Copy link

shawngoh87 commented Aug 10, 2023

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

Check this PR: python/cpython#23858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants