django-jack icon indicating copy to clipboard operation
django-jack copied to clipboard

Crashes right away

Open cap10morgan opened this issue 13 years ago • 3 comments

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 avatar Apr 18 '11 18:04 cap10morgan

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?

cap10morgan avatar Apr 18 '11 18:04 cap10morgan

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

andreisavu avatar Apr 18 '11 18:04 andreisavu

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.

drasch avatar May 04 '11 16:05 drasch