Benji York wrote:
Michael Haubenwallner wrote:
It is like Marius Gedminas said earlier in his response: just install
python2.4-profiler package and it works.
I'm glad that solved your particular problem. zope.testing is supposed
to work without hotshot (and therefore its dependencies like profile),
so I'd like to figure out why it's not working correctly.
hotshot.stats throws the ImportException and then exits; there is no
traceback available. I think, the only way to catch this case is
trying to import profile in testrunner itself before importing
This is what has me confused; the only imports of hotshot and
hotshot.stats are protected by try/excepts.
You are completely right and there is no problem with python installed
Just for the record, the problem is created by the ubuntu diffs that
where automatically installed with the python2.4-minimal package
Here is the patch that made it break:
+--- Lib/hotshot/stats.py~ 2001-10-15 22:18:53.000000000 +0000
++++ Lib/hotshot/stats.py 2006-04-21 18:39:17.691461512 +0000
+@@ -1,7 +1,14 @@
+ """Statistics analyzer for HotShot."""
++ import profile
++ import pstats
++except ImportError, msg:
++ import sys
++ sys.stderr.write('ImportError: %s\n' % str(msg))
++ sys.stderr.write('please install the python%s-profiler package\n'
++ % sys.version[:3])
+ import hotshot.log
Hth anyone facing the same problem,
Zope3-dev mailing list