This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pstats module crashes on trailing backslash
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, isandler
Priority: normal Keywords:

Created on 2010-07-09 01:18 by isandler, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg109656 - (view) Author: Ilya Sandler (isandler) Date: 2010-07-09 01:18
a session attached:

cheetah:~/wrk/svn/psi-poly5/poly/aut/prof> ~/comp/python/trunk/python -m pstats prof.out 
Welcome to the profile statistics browser.
% stats 20 \
Thu Jul  8 17:50:27 2010    prof.out

         197258358 function calls (197187736 primitive calls) in 321.090 CPU seconds

Traceback (most recent call last):
  File "/home/ilya/comp/python/trunk/Lib/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/ilya/comp/python/trunk/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 681, in <module>
    browser.cmdloop()
  File "/home/ilya/comp/python/trunk/Lib/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/home/ilya/comp/python/trunk/Lib/cmd.py", line 219, in onecmd
    return func(arg)
  File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 657, in do_stats
    return self.generic('print_stats', line)
  File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 578, in generic
    getattr(self.stats, fn)(*processed)
  File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 359, in print_stats
    width, list = self.get_print_list(amount)
  File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 332, in get_print_list
    list, msg = self.eval_print_amount(selection, list, msg)
  File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 306, in eval_print_amount
    if re.search(sel, func_std_string(func)):
  File "/home/ilya/comp/python/trunk/Lib/re.py", line 142, in search
    return _compile(pattern, flags).search(string)
  File "/home/ilya/comp/python/trunk/Lib/re.py", line 245, in _compile
    raise error, v # invalid expression
sre_constants.error: bogus escape (end of line)
msg112448 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-02 12:06
Thanks, fixed in r83523.
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53455
2010-08-02 12:06:28georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112448

resolution: fixed
2010-07-09 01:18:08isandlercreate