classification
Title: interactive pstats broken
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: MLModel, ezio.melotti, georg.brandl
Priority: normal Keywords:

Created on 2010-01-26 00:02 by MLModel, last changed 2010-08-02 12:06 by georg.brandl. This issue is now closed.

Messages (2)
msg98304 - (view) Author: Mitchell Model (MLModel) Date: 2010-01-26 00:02
I created a profile file, started up python3 -m pstats myfilename, did strip, then "stats 10" and got:

stats 10
Mon Jan 25 17:58:39 2010    cd.profile

         17529566 function calls (17528644 primitive calls) in 88.626 CPU seconds

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/runpy.py", line 128, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/runpy.py", line 34, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py", line 689, in <module>
    browser.cmdloop()
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/cmd.py", line 139, in cmdloop
    stop = self.onecmd(line)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/cmd.py", line 216, in onecmd
    return func(arg)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py", line 665, in do_stats
    return self.generic('print_stats', line)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py", line 586, in generic
    getattr(self.stats, fn)(*processed)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py", line 358, in print_stats
    width, list = self.get_print_list(amount)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py", line 331, in get_print_list
    list, msg = self.eval_print_amount(selection, list, msg)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py", line 314, in eval_print_amount
    new_list = list[:count]
TypeError: 'dict_keys' object is not subscriptable
msg112449 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-02 12:06
Thanks, fixed in r83523.
History
Date User Action Args
2010-08-02 12:06:42georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112449

resolution: fixed
2010-01-26 00:39:44ezio.melottisetpriority: normal
nosy: + ezio.melotti

type: behavior
stage: test needed
2010-01-26 00:02:38MLModelcreate