local variable 'auction_item' referenced before assignment
Request Method: | GET |
---|---|
Request URL: | http://www.opusball.org/auction/detail/princess_tea_party/ |
Django Version: | 1.4 |
Exception Type: | UnboundLocalError |
Exception Value: | local variable 'auction_item' referenced before assignment |
Exception Location: | /opusball/mysite/auction/views.py in detail, line 38 |
Python Executable: | /usr/bin/python |
Python Version: | 2.6.6 |
Python Path: | ['/usr/local/lib/python2.6/dist-packages/requests-0.13.2-py2.6.egg/requests/packages', '/opusball', '/usr/bin', '/usr/local/lib/python2.6/dist-packages/google.directions-0.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/d9t.json-0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/stripe-1.9.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/requests-0.13.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6'] |
Server time: | Fri, 29 Mar 2024 00:01:55 -0500 |
/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py
in get_response
for middleware_method in self._view_middleware:
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
try:
response = callback(request, *callback_args, **callback_kwargs)...
except Exception, e:
# If the view raised an exception, run it through exception
# middleware, and if the exception middleware returns a
# response, use that. Otherwise, reraise the exception.
for middleware_method in self._exception_middleware:
response = middleware_method(request, e)
Variable | Value |
---|---|
exceptions | <module 'django.core.exceptions' from '/usr/local/lib/python2.6/dist-packages/django/core/exceptions.pyc'> |
e | UnboundLocalError("local variable 'auction_item' referenced before assignment",) |
callback_args | () |
settings | <django.conf.LazySettings object at 0x27ca310> |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x34093d0>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x33d8d50> |
request | "<WSGIRequest\npath:/auction/detail/princess_tea_party/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CSRF_COOKIE': 'FeemsmDxEd2yDEpna4NK2OwT949AYggG',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.opusball.org',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.238.235.181',\n 'PATH_INFO': u'/auction/detail/princess_tea_party/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/auction/detail/princess_tea_party/',\n 'REMOTE_ADDR': '3.238.235.181',\n 'REMOTE_PORT': '80',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'www.opusball.org',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'gunicorn/0.14.2',\n 'gunicorn.socket': <socket._socketobject object at 0x34f7e50>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f798a5381e0>,\n 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x27a8290>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x38c8ed0>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
callback | <function detail at 0x35f3848> |
resolver | <RegexURLResolver mysite.urls (None:None) ^/> |
urlresolvers | <module 'django.core.urlresolvers' from '/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.pyc'> |
callback_kwargs | {'auction_url': u'princess_tea_party'} |
response | None |
urlconf | 'mysite.urls' |
/opusball/mysite/auction/views.py
in detail
list_live = Auction.objects.filter(auction_type = "live")
live_short_list = random.sample(list_live, 3)#uncomment when live items get entered
list_silent = Auction.objects.filter(auction_type = "silent")
silent_short_list = random.sample(list_silent, 3)
#live_short_list = random.sample(list_silent,3)#remove this line when live items get entered
return render_to_response('auction/detail.html', {'auction_item': auction_item, 'list_sponsors': list_sponsors, 'live_short_list': live_short_list, 'silent_short_list': silent_short_list}, context_instance=RequestContext(request))...
Variable | Value |
---|---|
list_sponsors | [<Sponsor: Cindy and Chip Murphy>, <Sponsor: Glazers>, <Sponsor: Jan and Dr. Randal Hundley>, <Sponsor: Metal Recycling Corporation>, <Sponsor: Simmons Bank>, <Sponsor: Sissy's Log Cabin>, <Sponsor: Soiree>, <Sponsor: Thoma Thoma>, <Sponsor: Tipton Hurst>] |
list_silent | [<Auction: Dining and The Rep Performance>, <Auction: Vintage Chain Necklace>, <Auction: Powder & Smoke>, <Auction: Fall Fashion at Feinstein's>, <Auction: Invigorating Hues of Harmony>, <Auction: River Rail Ride and Dinner>, <Auction: Tory Burch from Barbara Jean>, <Auction: Aspen Grove by Barry Thomas>, <Auction: Glories of Comic Books>, <Auction: Stanley Jewelers>, <Auction: Baroni Navy Blazer>, <Auction: Proposals Necklace and Earrings>, <Auction: Vintage Port>, <Auction: Executive Clothiers>, <Auction: Jones and Son Fine Jewelry>, <Auction: Basket of Goodies>, <Auction: Concert and Dinner in Hillcrest>, <Auction: Boulevard Bread Dinner Package>, <Auction: Dinner and Show>, <Auction: ASO Intimate Neighborhood Concerts Season Tickets>, '...(remaining elements truncated)...'] |
request | "<WSGIRequest\npath:/auction/detail/princess_tea_party/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CSRF_COOKIE': 'FeemsmDxEd2yDEpna4NK2OwT949AYggG',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.opusball.org',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.238.235.181',\n 'PATH_INFO': u'/auction/detail/princess_tea_party/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/auction/detail/princess_tea_party/',\n 'REMOTE_ADDR': '3.238.235.181',\n 'REMOTE_PORT': '80',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'www.opusball.org',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'gunicorn/0.14.2',\n 'gunicorn.socket': <socket._socketobject object at 0x34f7e50>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f798a5381e0>,\n 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x27a8290>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x38c8ed0>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
auction_url | u'princess_tea_party' |
live_short_list | [<Auction: Fletcher Bensky Furs & Outerwear>, <Auction: Dinner and Music with the Maestro>, <Auction: The Best of China - Splendid China Nine Day Tour>] |
list_live | [<Auction: Sissy's Log Cabin Gift Certificate>, <Auction: Dinner and Music with the Maestro>, <Auction: Fletcher Bensky Furs & Outerwear>, <Auction: Stunning Sissy's Jewelry>, <Auction: Napa Valley Epicurean Adventure>, <Auction: The New Robinson Curtain Rises>, <Auction: Personal Music Masterpiece>, <Auction: Symphony Designer House Dinner Party>, <Auction: Casa Del Quezetal>, <Auction: Unforgettable Capital Hotel Stay>, <Auction: Hidden Treasures of Tuscany>, <Auction: The Magic of Moss Mountain>, <Auction: The Best of China - Splendid China Nine Day Tour>] |
silent_short_list | [<Auction: Concert and Dinner in Hillcrest>, <Auction: Vintage Chain Necklace>, <Auction: Basket of Goodies>] |
auction_item_list | [] |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SOFTWARE | 'gunicorn/0.14.2' |
SCRIPT_NAME | u'' |
wsgi.input | <gunicorn.http.body.Body object at 0x38c8ed0> |
REQUEST_METHOD | 'GET' |
HTTP_HOST | 'www.opusball.org' |
PATH_INFO | u'/auction/detail/princess_tea_party/' |
wsgi.multithread | False |
QUERY_STRING | '' |
HTTP_CONNECTION | 'close' |
HTTP_ACCEPT | '*/*' |
HTTP_USER_AGENT | 'claudebot' |
wsgi.version | (1, 0) |
REMOTE_PORT | '80' |
RAW_URI | '/auction/detail/princess_tea_party/' |
REMOTE_ADDR | '3.238.235.181' |
wsgi.run_once | False |
wsgi.errors | <open file '<stderr>', mode 'w' at 0x7f798a5381e0> |
wsgi.multiprocess | False |
wsgi.url_scheme | 'http' |
gunicorn.socket | <socket._socketobject object at 0x34f7e50> |
SERVER_NAME | 'www.opusball.org' |
SERVER_PORT | '80' |
HTTP_X_FORWARDED_FOR | '3.238.235.181' |
wsgi.file_wrapper | '' |
CSRF_COOKIE | 'FeemsmDxEd2yDEpna4NK2OwT949AYggG' |
mysite.settings
Setting | Value |
---|---|
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'en-us' |
ROOT_URLCONF | 'mysite.urls' |
MANAGERS | () |
DEFAULT_CHARSET | 'utf-8' |
STATIC_ROOT | '/opusball/mysite/static/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
FILE_UPLOAD_PERMISSIONS | None |
URL_VALIDATOR_USER_AGENT | 'Django/1.4 (https://www.djangoproject.com)' |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
ADMIN_FOR | () |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M') |
DATABASES | {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'HOST': '', 'NAME': 'opusball', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': 'webadmin'}} |
SERVER_EMAIL | 'root@localhost' |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') |
DEFAULT_CONTENT_TYPE | 'text/html' |
APPEND_SLASH | True |
FIRST_DAY_OF_WEEK | 0 |
DATABASE_ROUTERS | [] |
YEAR_MONTH_FORMAT | 'F Y' |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': ''}} |
SESSION_COOKIE_PATH | '/' |
USE_X_FORWARDED_HOST | False |
MIDDLEWARE_CLASSES | ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') |
USE_I18N | True |
THOUSAND_SEPARATOR | ',' |
SECRET_KEY | u'********************' |
LANGUAGE_COOKIE_NAME | 'django_language' |
DEFAULT_INDEX_TABLESPACE | '' |
TRANSACTIONS_MANAGED | False |
LOGGING_CONFIG | 'django.utils.log.dictConfig' |
SEND_BROKEN_LINK_EMAILS | False |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
WSGI_APPLICATION | 'mysite.wsgi.application' |
TEMPLATE_DEBUG | True |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
FORCE_SCRIPT_NAME | None |
CACHE_BACKEND | 'locmem://' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SESSION_COOKIE_SECURE | False |
CSRF_COOKIE_DOMAIN | None |
FILE_CHARSET | 'utf-8' |
DEBUG | True |
SESSION_FILE_PATH | None |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
INSTALLED_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'sponsors', 'mysite.auction', 'mysite.reservation', 'mysite.opus_ball', 'mysite.musicians', 'mysite.checkin', 'mysite.youth_registration') |
LANGUAGES | (('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) |
COMMENTS_ALLOW_PROFANITIES | False |
STATICFILES_DIRS | '/opusball/mysite/static/images/' |
PREPEND_WWW | False |
SECURE_PROXY_SSL_HEADER | None |
SESSION_COOKIE_HTTPONLY | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
MONTH_DAY_FORMAT | 'F j' |
LOGIN_URL | '/accounts/login/' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
TIME_FORMAT | 'P' |
DATE_INPUT_FORMATS | ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') |
CSRF_COOKIE_NAME | 'csrftoken' |
EMAIL_HOST_PASSWORD | u'********************' |
PASSWORD_RESET_TIMEOUT_DAYS | u'********************' |
CACHE_MIDDLEWARE_ALIAS | 'default' |
SESSION_SAVE_EVERY_REQUEST | False |
NUMBER_GROUPING | 0 |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_COOKIE_PATH | '/' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGGING | {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} |
IGNORABLE_404_URLS | () |
LOCALE_PATHS | () |
TEMPLATE_STRING_IF_INVALID | '' |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | True |
FIXTURE_DIRS | () |
EMAIL_HOST | 'smtp.gmail.com' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '/opusball/mysite/media/' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
ADMINS | () |
FORMAT_MODULE_PATH | None |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
MEDIA_URL | '/media/' |
DATETIME_FORMAT | 'N j, Y, P' |
TEMPLATE_DIRS | ('/opusball/mysite/templates/',) |
SITE_ID | 1 |
DISALLOWED_USER_AGENTS | () |
ALLOWED_INCLUDE_ROOTS | () |
DECIMAL_SEPARATOR | '.' |
SHORT_DATE_FORMAT | 'm/d/Y' |
TEST_RUNNER | 'django.test.simple.DjangoTestSuiteRunner' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
TIME_ZONE | 'America/Chicago' |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
DEFAULT_TABLESPACE | '' |
TEMPLATE_CONTEXT_PROCESSORS | ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages') |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'mysite.settings' |
USE_ETAGS | False |
LANGUAGES_BIDI | ('he', 'ar', 'fa') |
FILE_UPLOAD_TEMP_DIR | None |
INTERNAL_IPS | () |
STATIC_URL | '/static/' |
EMAIL_PORT | 587 |
USE_TZ | True |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
PASSWORD_HASHERS | u'********************' |
ABSOLUTE_URL_OVERRIDES | {} |
CACHE_MIDDLEWARE_SECONDS | 600 |
DATETIME_INPUT_FORMATS | ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y') |
EMAIL_HOST_USER | 'musicians@arkansassymphony.org' |
PROFANITIES_LIST | u'********************' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard 500 page.