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: Bug in pstats.print_callers
Type: crash Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Exception in pstats print_callers()
View: 1269
Assigned To: Nosy List: JoelSchaerer, gvanrossum, therve
Priority: normal Keywords:

Created on 2007-10-23 10:31 by JoelSchaerer, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
profile.pck JoelSchaerer, 2007-10-23 10:31
1315.diff therve, 2007-11-23 16:14
Messages (4)
msg56677 - (view) Author: Joel Schaerer (JoelSchaerer) Date: 2007-10-23 10:31
The following command:

python -c "import
pstats;s=pstats.Stats('profile.pck');s.strip_dirs();s.print_callers(25)"

Crashes with the following traceback:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/pstats.py", line 388, in print_callers
    self.print_call_line(width, func, callers, "<-")
  File "/usr/lib/python2.5/pstats.py", line 417, in print_call_line
    nc, cc, tt, ct = value
ValueError: too many values to unpack

when called with the attached profile.pck file, which was generated with
cProfile.

The interesting thing is that is I remove strip_dirs, it works.
msg56681 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-23 14:17
This will get more attention if you suggest a patch...
msg57787 - (view) Author: Thomas Herve (therve) * Date: 2007-11-23 16:14
The real bug is in fact in add_callers, where it concatenates tuples
instead of adding the values. I'll try to write a test this week-end if
nobody beats me to it.

The attached is against current trunk.
msg57788 - (view) Author: Thomas Herve (therve) * Date: 2007-11-23 16:28
Oh I didn't see, but this one should probably closed as duplicate of 1269.
History
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45656
2007-11-24 13:37:40georg.brandlsetstatus: open -> closed
resolution: duplicate
superseder: Exception in pstats print_callers()
2007-11-23 16:28:31thervesetmessages: + msg57788
2007-11-23 16:14:56thervesetfiles: + 1315.diff
nosy: + therve
messages: + msg57787
2007-10-23 14:17:48gvanrossumsetnosy: + gvanrossum
messages: + msg56681
2007-10-23 10:31:25JoelSchaerercreate