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 (profiler) doens't support unicode paths
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, moese
Priority: normal Keywords:

Created on 2006-11-26 19:26 by moese, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg30674 - (view) Author: Moese (moese) Date: 2006-11-26 19:26
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)):
msg30675 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-11-26 19:28
Thanks for the report, fixed in rev. 52845, 52846 (2.5).
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44277
2006-11-26 19:26:23moesecreate