[ python-Bugs-1603321 ] pstats module (profiler) doens't support unicode paths

SourceForge.net noreply at sourceforge.net
Sun Nov 26 20:28:41 CET 2006


Bugs item #1603321, was opened at 2006-11-26 19:26
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603321&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Adal Chiriliuc (adalx)
>Assigned to: Georg Brandl (gbrandl)
Summary: pstats module (profiler) doens't support unicode paths

Initial Comment:
This call fails if fileName is an unicode string.
stats = pstats.Stats(fileName)

The cause is this line from pstats.py (line 119):
....elif type(arg) == type(""):
This replacement fixes the problem:
....elif isinstance(arg, (str, unicode)):


----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-11-26 19:28

Message:
Logged In: YES 
user_id=849994
Originator: NO

Thanks for the report, fixed in rev. 52845, 52846 (2.5).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603321&group_id=5470


More information about the Python-bugs-list mailing list