andreisavu / django-jack

Jack and the Beanstalkd. Webapp for basic work queue administration.
http://kr.github.com/beanstalkd/
Apache License 2.0
60 stars 12 forks source link

Crashes right away #3

Open cap10morgan opened 13 years ago

cap10morgan commented 13 years ago

I tested it in Django 1.1 and 1.3. Here's the error I get:

Environment:

Request Method: GET Request URL: http://localhost:8000/beanstalk/

Django Version: 1.3 Python Version: 2.6.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'beanstalk'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'djangoflash.middleware.FlashMiddleware')

Traceback: File "/Users/morganw/src/django-jack/venv/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/Users/morganw/src/django-jack/venv/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/contrib/auth/decorators.py" in _wrapped_view
  2. return view_func(request, _args, *_kwargs) File "/Users/morganw/src/django-jack/jack/beanstalk/views.py" in index
  3. checks_errors = checks.run_all(client) File "/Users/morganw/src/django-jack/jack/beanstalk/checks/init.py" in run_all
  4. result = check.do_check(client) File "/Users/morganw/src/django-jack/jack/beanstalk/checks/buried.py" in do_check
  5. current_buried = client.stats()['current-jobs-buried']

Exception Type: TypeError at /beanstalk/ Exception Value: string indices must be integers, not str

cap10morgan commented 13 years ago

Figured it out: I didn't have PyYAML installed. It seems beanstalkc doesn't have that listed as a hard dependency such that easy_install will install it automatically. But it does appear to be a dependency for django-jack, so maybe it should be listed as such there?

andreisavu commented 13 years ago

Yes it should be added as a dependency in django-jack. Thanks for the notice.

drasch commented 13 years ago

I ran into this same issue. It'd be nice if it also generated a harder failure. The error generated is challenging to debug and didn't prompt me to go back and see that the console was throwing an error about PyYAML.