[issue766910] fix one or two bugs in trace.py

Eli Bendersky report at bugs.python.org
Sat Dec 4 09:34:02 CET 2010

Eli Bendersky <eliben at gmail.com> added the comment:


I reviewed the patch and ported the changes to the newest sources (since the fix to issue 9299, os.makedirs can be naturally used with its new flag to fix the bug Zooko refers to).

However, while experimenting, I think I ran into much larger problems. Either that or I've forgotten how to use the module :-) Attaching two files (one imports the other) on which I try to run the following:

python -m trace -c trace_target.py

>> OK: I get trace_target.cover & traced_module.cover created

However, now running:

python -m trace -r --file=trace_target.cover

>> ...
    pickle.load(open(self.infile, 'rb'))
_pickle.UnpicklingError: invalid load key, ' '.

Also, trying to provide --file to -c:

python -m trace -c trace_target.py --file=xyz.cover

>> xyz.cover is ignored and the same two .cover files are created.

Can you take a look at this?

Added file: http://bugs.python.org/file19933/trace_target.py

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list