rkern / line_profiler

(OLD REPO) Line-by-line profiling for Python - Current repo ->
https://github.com/pyutils/line_profiler
Other
3.6k stars 256 forks source link

Unreadable output #178

Closed joaocaldeira closed 4 years ago

joaocaldeira commented 4 years ago

Hi,

I just installed line profiler. It seems to work well when running the script, I see "Wrote profile results to test_sum.py.lprof". However when I look at the contents of the created file, I get something unreadable:

▒▒R▒line_profiler._line_profiler▒▒ LineStats▒▒▒)▒▒}▒(▒timings▒}▒▒unit▒G>▒▒▒▒▒▒ub.

If I try to use pstats as indicated in the readme, I get ValueError: bad marshal data (unknown type code).

I'm not sure what could be broken.

rkern commented 4 years ago

The README states that the way to view the results of line-profiling (as opposed to function-profiling) is as follows:

$ python -m line_profiler script_to_profile.py.lprof