[New-bugs-announce] [issue22642] trace module: unclear error message

Giampaolo Rodola' report at bugs.python.org
Wed Oct 15 14:46:20 CEST 2014

New submission from Giampaolo Rodola':

$ python3.4 -m trace -l 
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.4/trace.py", line 858, in <module>
  File "/usr/local/lib/python3.4/trace.py", line 787, in main
    progname = prog_argv[0]
IndexError: list index out of range

I would expect something more clear to be printed, like the program usage helper you get in this case:

$ python3.4 -m trace 
/usr/local/lib/python3.4/trace.py: must specify one of --trace, --count, --report, --listfuncs, or --trackcalls

messages: 229441
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: trace module: unclear error message
versions: Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list