[Twisted-Python] Profiling problem: "bad marshal data"

Peter Westlake peter.westlake at pobox.com
Mon Sep 3 12:10:32 EDT 2012


When I pass twistd the --savestats option to save profile information
as a pstats.Stats object instead of a textual report, the output file
cannot be read:

   import pstats
   p = pstats.Stats(filename)

gives:

   ValueError: bad marshal data (unknown type code)

An output file generated with cProfile.run() can be read.
Running twistd without --savestats generates a valid-looking
textual report.

This is Python 2.7.3, Twisted 12.0.0, on Debian.

Peter.



More information about the Twisted-Python mailing list