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

set_trace fails with IndexError #278

Open
alanbernstein opened this issue Jan 31, 2024 · 0 comments
Open

set_trace fails with IndexError #278

alanbernstein opened this issue Jan 31, 2024 · 0 comments

Comments

@alanbernstein
Copy link
Contributor

The below stack trace occurs when I call set_trace(). The program otherwise runs without error with that set_trace removed. pdb.set_trace() does not have the same problem. I am working on finding a minimal producer, but I hoped I could get a clue before sinking too much time into that.

Traceback (most recent call last):
  File "search_tools/smart_search.py", line 260, in <module>
    main(sys.argv)
  File "search_tools/smart_search.py", line 64, in main
    run_commands(cmds, verbosity)
  File "search_tools/smart_search.py", line 81, in run_commands
    set_trace()
  File "/home/alan/.local/lib/python3.8/site-packages/ipdb/__main__.py", line 77, in set_trace
    p = _init_pdb(context).set_trace(frame)
  File "/home/alan/.local/lib/python3.8/site-packages/ipdb/__main__.py", line 54, in _init_pdb
    debugger_cls = _get_debugger_cls()
  File "/home/alan/.local/lib/python3.8/site-packages/ipdb/__main__.py", line 34, in _get_debugger_cls
    ipapp.initialize(["--no-term-title"])
  File "<decorator-gen-113>", line 2, in initialize
  File "/home/alan/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/alan/.local/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 308, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/home/alan/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/alan/.local/lib/python3.8/site-packages/IPython/core/application.py", line 450, in initialize
    self.parse_command_line(argv)
  File "/home/alan/.local/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 303, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<decorator-gen-4>", line 2, in parse_command_line
  File "/home/alan/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/alan/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 538, in parse_command_line
    self.cli_config = deepcopy(loader.load_config())
  File "/home/alan/.local/lib/python3.8/site-packages/traitlets/config/loader.py", line 745, in load_config
    self._create_parser(aliases, flags)
  File "/home/alan/.local/lib/python3.8/site-packages/traitlets/config/loader.py", line 757, in _create_parser
    self.parser = ArgumentParser(*self.parser_args, **self.parser_kw)
  File "/usr/lib/python3.8/argparse.py", line 1672, in __init__
    prog = _os.path.basename(_sys.argv[0])
IndexError: list index out of range
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