Strange Hotshot problem...

James Kew james.kew at btinternet.com
Sat Oct 25 06:44:35 EDT 2003


"KefX" <keflimarcvsx at aol.comNOSPAM> wrote in message
news:20031024181102.26916.00000093 at mb-m05.aol.com...
> See, in my module's init code, I'm basically
> I'm creating the hotshot.Profile object with the required path, bound to
> _profiler, then I do _profiler.start() ...at the very end, I do
> _profiler.stop() and _profiler.close(), and then I try to load the stats
back
> with hotshot.stats.load() with the same path. Well, it finds the file just
> fine, but it can't read it. It raises an IndexError from trying to pop an
empty
> list or some such.

Not that this is going to help, but: me too. I've seen the exact same
problem -- loading saved stats throws an exception -- when profiling with
Hotshot.

This was in a pure-Python project, and it seemed sensitive to the exact code
being profiled: it'd work fine on some inputs, but then I'd change one or
two lines to attempt an optimisation and it'd fail.

I ended up giving up and going back to profile -- slower, but livable with.

James






More information about the Python-list mailing list