Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around hotshot IndexError: pop from empty list in python < 2.7 #391

Open
jpellerin opened this issue Dec 14, 2011 · 0 comments
Open
Assignees

Comments

@jpellerin
Copy link
Member

What steps will reproduce the problem?

  1. run --with-profile using a version of Python < 2.7
  2. wait until stats are processed

What is the expected output? What do you see instead?

It should process the stats but instead I get this Traceback:

Traceback (most recent call last):
File "./manage.py", line 64, in
execute_manager(settings)
File "/Users/kumar/dev/zamboni/vendor/src/django/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/Users/kumar/dev/zamboni/vendor/src/django/django/core/management/init.py", line 379, in execute
...
self.config.plugins.report(self.stream)
File "/Users/kumar/dev/zamboni/vendor/lib/python/nose/plugins/manager.py", line 82, in call
return self.call(_arg, *_kw)
File "/Users/kumar/dev/zamboni/vendor/lib/python/nose/plugins/manager.py", line 150, in simple
result = meth(_arg, *_kw)
File "/Users/kumar/dev/zamboni/vendor/lib/python/nose/plugins/prof.py", line 102, in report
prof_stats = stats.load(self.pfile)
File "/usr/local/Cellar/python2.6/2.6.5/lib/python2.6/hotshot/stats.py", line 12, in load
return StatsLoader(filename).load()
File "/usr/local/Cellar/python2.6/2.6.5/lib/python2.6/hotshot/stats.py", line 29, in load
for event in log:
File "/usr/local/Cellar/python2.6/2.6.5/lib/python2.6/hotshot/log.py", line 109, in next
return what, self._pop(), tdelta
IndexError: pop from empty list

Note that this is a Python bug that is fixed in Python 2.7, see http://bugs.python.org/issue1019882

The bug suggests working around the issue by calling .run() instead of .start() and .stop() so perhaps Nose can do that? Not sure if that's feasible.

Please use labels and text to provide additional information.

In this case Nose was executed as manage.py test using DjangoNose http://github.com/jbalogh/django-nose

Google Code Info:
Issue #: 371
Author: kumar.mcmillan
Created On: 2010-10-16T21:34:55.000Z
Closed On:

@ghost ghost assigned jpellerin Dec 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant