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

ChatDBG fails with error when certain options are passed #50

Open
nicovank opened this issue Sep 18, 2024 · 0 comments
Open

ChatDBG fails with error when certain options are passed #50

nicovank opened this issue Sep 18, 2024 · 0 comments

Comments

@nicovank
Copy link
Collaborator

Seems like we could improve the error message. Maybe try/except and print --help message on exception?

> chatdbg --version
Traceback (most recent call last):
  File "/usr/local/bin/chatdbg", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/ChatDBG/src/chatdbg/__main__.py", line 37, in main
    ipdb.__main__.main()
  File "/usr/local/lib/python3.12/dist-packages/ipdb/__main__.py", line 275, in main
    opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command='])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/getopt.py", line 93, in getopt
    opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/getopt.py", line 157, in do_longs
    has_arg, opt = long_has_args(opt, longopts)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/getopt.py", line 174, in long_has_args
    raise GetoptError(_('option --%s not recognized') % opt, opt)
getopt.GetoptError: option --version not recognized
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

1 participant