list index out of range
Request Method: | GET |
---|---|
Request URL: | https://danielguggenheim.com/galerie/dg4tet-trailer |
Django Version: | 1.10 |
Exception Type: | IndexError |
Exception Value: | list index out of range |
Exception Location: | /usr/local/lib/python2.7/dist-packages/django/db/models/query.py in __getitem__, line 295 |
Python Executable: | /usr/bin/python |
Python Version: | 2.7.12 |
Python Path: | ['/var/www/danielguggenheim/danielguggenheim', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages'] |
Server time: | Fr, 29 Mär 2024 13:51:14 +0000 |
/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response, assigned=available_attrs(get_response))
def inner(request):
try:
response = get_response(request)...
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | IndexError('list index out of range',) |
get_response | <bound method WSGIHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f37710cc5d0>> |
request | <WSGIRequest: GET '/galerie/dg4tet-trailer'> |
/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py
in _legacy_get_response
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)
if response:
break
if response is None:
response = self._get_response(request)...
return response
Variable | Value |
---|---|
middleware_method | <bound method MessageMiddleware.process_request of <django.contrib.messages.middleware.MessageMiddleware object at 0x7f376ab81990>> |
request | <WSGIRequest: GET '/galerie/dg4tet-trailer'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f37710cc5d0> |
/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function gallery_item at 0x7f376a96cb90> |
callback_args | () |
callback_kwargs | {'locale': 'de', 'slug': u'dg4tet-trailer'} |
e | IndexError('list index out of range',) |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f376ab814d0>> |
request | <WSGIRequest: GET '/galerie/dg4tet-trailer'> |
resolver | <RegexURLResolver 'danielguggenheim.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=danielguggenheim.views.gallery.gallery_item, args=(), kwargs={'locale': 'de', 'slug': u'dg4tet-trailer'}, url_name=gallery_item, app_names=['gallery'], namespaces=['gallery']) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f37710cc5d0> |
wrapped_callback | <function gallery_item at 0x7f376a96cb90> |
/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function gallery_item at 0x7f376a96cb90> |
callback_args | () |
callback_kwargs | {'locale': 'de', 'slug': u'dg4tet-trailer'} |
e | IndexError('list index out of range',) |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f376ab814d0>> |
request | <WSGIRequest: GET '/galerie/dg4tet-trailer'> |
resolver | <RegexURLResolver 'danielguggenheim.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=danielguggenheim.views.gallery.gallery_item, args=(), kwargs={'locale': 'de', 'slug': u'dg4tet-trailer'}, url_name=gallery_item, app_names=['gallery'], namespaces=['gallery']) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f37710cc5d0> |
wrapped_callback | <function gallery_item at 0x7f376a96cb90> |
/usr/local/lib/python2.7/dist-packages/django/views/decorators/http.py
in inner
def inner(request, *args, **kwargs):
if request.method not in request_method_list:
logger.warning(
'Method Not Allowed (%s): %s', request.method, request.path,
extra={'status_code': 405, 'request': request}
)
return HttpResponseNotAllowed(request_method_list)
return func(request, *args, **kwargs)...
return inner
return decorator
require_GET = require_http_methods(["GET"])
require_GET.__doc__ = "Decorator to require that a view only accepts the GET method."
Variable | Value |
---|---|
args | () |
func | <function gallery_item at 0x7f376a96cb18> |
kwargs | {'locale': 'de', 'slug': u'dg4tet-trailer'} |
request | <WSGIRequest: GET '/galerie/dg4tet-trailer'> |
request_method_list | ['GET'] |
/var/www/danielguggenheim/danielguggenheim/danielguggenheim/views/gallery.py
in gallery_item
@require_http_methods(["GET"])
def gallery_item(request, slug, locale='de'):
if locale in ['en', 'de']:
translation.activate(locale)
gallery = GalleryItem.objects.filter(slug=slug)[0]...
context = {
'item': gallery.get_template_context()
}
return render(request, 'gallery_item.html', context)
Variable | Value |
---|---|
locale | 'de' |
request | <WSGIRequest: GET '/galerie/dg4tet-trailer'> |
slug | u'dg4tet-trailer' |
/usr/local/lib/python2.7/dist-packages/django/db/models/query.py
in __getitem__
else:
stop = None
qs.query.set_limits(start, stop)
return list(qs)[::k.step] if k.step else qs
qs = self._clone()
qs.query.set_limits(k, k + 1)
return list(qs)[0]...
def __and__(self, other):
self._merge_sanity_check(other)
if isinstance(other, EmptyQuerySet):
return other
if isinstance(self, EmptyQuerySet):
Variable | Value |
---|---|
k | 0 |
qs | <QuerySet []> |
self | <QuerySet []> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip, br' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_CONNECTING_IP | '54.234.124.70' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_CF_RAY | '86c055607b521777-IAD' |
HTTP_CF_VISITOR | '{"scheme":"https"}' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'danielguggenheim.com' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '54.234.124.70, 162.158.79.165' |
HTTP_X_FORWARDED_PROTO | 'https' |
PATH_INFO | u'/galerie/dg4tet-trailer' |
QUERY_STRING | '' |
RAW_URI | '/galerie/dg4tet-trailer' |
REMOTE_ADDR | '127.0.0.1' |
REMOTE_PORT | '39258' |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | u'' |
SERVER_NAME | '0.0.0.0' |
SERVER_PORT | '9000' |
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SOFTWARE | 'gunicorn/19.7.1' |
gunicorn.socket | <socket._socketobject object at 0x7f3769de8d00> |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f3769e9ad10> |
wsgi.file_wrapper | '' |
wsgi.input | <gunicorn.http.body.Body object at 0x7f3769e9ac50> |
wsgi.multiprocess | False |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'https' |
wsgi.version | (1, 0) |
danielguggenheim.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['www.danielguggenheim.com'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | [u'django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | u'********************' |
AUTH_USER_MODEL | u'auth.User' |
BASE_DIR | '/var/www/danielguggenheim/danielguggenheim' |
CACHES | {u'default': {u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | u'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CHANNEL_TYPE_VALUE | 0 |
CONVERT_TYPE_VALUE | 0 |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | u'csrftoken' |
CSRF_COOKIE_PATH | u'/' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | u'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | u'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'HOST': 'localhost', 'NAME': 'danielguggenheim', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'danielguggenheim'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | u'N j, Y, P' |
DATETIME_INPUT_FORMATS | [u'%Y-%m-%d %H:%M:%S', u'%Y-%m-%d %H:%M:%S.%f', u'%Y-%m-%d %H:%M', u'%Y-%m-%d', u'%m/%d/%Y %H:%M:%S', u'%m/%d/%Y %H:%M:%S.%f', u'%m/%d/%Y %H:%M', u'%m/%d/%Y', u'%m/%d/%y %H:%M:%S', u'%m/%d/%y %H:%M:%S.%f', u'%m/%d/%y %H:%M', u'%m/%d/%y'] |
DATE_FORMAT | u'N j, Y' |
DATE_INPUT_FORMATS | [u'%Y-%m-%d', u'%m/%d/%Y', u'%m/%d/%y', u'%b %d %Y', u'%b %d, %Y', u'%d %b %Y', u'%d %b, %Y', u'%B %d %Y', u'%B %d, %Y', u'%d %B %Y', u'%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | u'.' |
DEFAULT_CHARSET | u'utf-8' |
DEFAULT_CONTENT_TYPE | u'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | u'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | u'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | u'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | u'' |
DEFAULT_TABLESPACE | u'' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | u'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | u'localhost' |
EMAIL_HOST_PASSWORD | u'********************' |
EMAIL_HOST_USER | u'' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | u'********************' |
EMAIL_SUBJECT_PREFIX | u'[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
FILE_CHARSET | u'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | [u'django.core.files.uploadhandler.MemoryFileUploadHandler', u'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FREQ_TYPE_VALUE | 8000 |
HOST | 'www.danielguggenheim.com' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'material', 'material.frontend', 'material.admin', 'tinymce', 'static_sitemaps', 'danielguggenheim', 'filer', 'easy_thumbnails', 'adminsortable'] |
INTERNAL_IPS | [] |
LANGUAGES | [('de', <django.utils.functional.__proxy__ object at 0x7f3770ad3710>), ('en', <django.utils.functional.__proxy__ object at 0x7f3770ad3750>)] |
LANGUAGES_BIDI | [u'he', u'ar', u'fa', u'ur'] |
LANGUAGE_CODE | 'en' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | u'django_language' |
LANGUAGE_COOKIE_PATH | u'/' |
LOCALE_PATHS | ('/var/www/danielguggenheim/danielguggenheim/locale',) |
LOGGING | {} |
LOGGING_CONFIG | u'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | u'/accounts/profile/' |
LOGIN_URL | u'/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/var/www/danielguggenheim/danielguggenheim/media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | u'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'material.frontend.middleware.SmoothNavigationMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | u'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | u'********************' |
PASSWORD_RESET_TIMEOUT_DAYS | u'********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'danielguggenheim.urls' |
SECRET_KEY | u'********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | u'root@localhost' |
SESSION_CACHE_ALIAS | u'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | u'sessionid' |
SESSION_COOKIE_PATH | u'/' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | u'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | u'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'danielguggenheim.settings' |
SHORT_DATETIME_FORMAT | u'm/d/Y P' |
SHORT_DATE_FORMAT | u'm/d/Y' |
SIGNING_BACKEND | u'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | ('/var/www/danielguggenheim/danielguggenheim/static',) |
STATICFILES_FINDERS | [u'django.contrib.staticfiles.finders.FileSystemFinder', u'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | u'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | None |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/var/www/danielguggenheim/danielguggenheim/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.i18n', 'django.template.context_processors.static', 'material.frontend.context_processors.modules']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | u'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | u',' |
THUMBNAIL_HIGH_RESOLUTION | True |
TIME_FORMAT | u'P' |
TIME_INPUT_FORMATS | [u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M'] |
TIME_ZONE | 'UTC' |
TINYMCE_DEFAULT_CONFIG | {'cleanup_on_startup': True, 'custom_undo_redo_levels': 10, 'plugins': 'table,spellchecker,paste,searchreplace', 'theme': 'advanced'} |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'danielguggenheim.wsgi.application' |
X_FRAME_OPTIONS | u'SAMEORIGIN' |
YEAR_MONTH_FORMAT | u'F Y' |
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 page generated by the handler for this status code.