string index out of range
Request Method: | GET |
---|---|
Request URL: | http://indiaenvironmentportal.org.in/ |
Django Version: | 1.6.5 |
Exception Type: | IndexError |
Exception Value: | string index out of range |
Exception Location: | /home/cseuser/sites/iep/apps/iep/middleware.py in process_response, line 12 |
Python Executable: | /home/cseuser/env/iep/bin/python2.6 |
Python Version: | 2.6.8 |
Python Path: | ['/home/cseuser/env/iep/bin', '/home/cseuser/env/iep/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg', '/home/cseuser/env/iep/lib/python2.6/site-packages/pip-1.3.1-py2.6.egg', '/home/cseuser/sites/iep/apps', '/home/cseuser/sites/iep/lib', '/home/cseuser/env/iep/lib64/python26.zip', '/home/cseuser/env/iep/lib64/python2.6', '/home/cseuser/env/iep/lib64/python2.6/plat-linux2', '/home/cseuser/env/iep/lib64/python2.6/lib-tk', '/home/cseuser/env/iep/lib64/python2.6/lib-old', '/home/cseuser/env/iep/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6', '/usr/lib/python2.6', '/home/cseuser/env/iep/lib/python2.6/site-packages'] |
Server time: | Fri, 29 Mar 2024 00:18:38 +0530 |
/home/cseuser/env/iep/lib/python2.6/site-packages/django/core/handlers/base.py
in get_response
# Get the exception info now, in case another exception is thrown later.
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
try:
# Apply response middleware, regardless of the response
for middleware_method in self._response_middleware:
response = middleware_method(request, response)...
response = self.apply_response_fixes(request, response)
except: # Any exception should be gathered and handled
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
return response
Variable | Value |
---|---|
e | Resolver404({u'path': u';', u'tried': [[<RegexURLPattern index ^$>], [<RegexURLResolver <RegexURLPattern list> (admin:admin) ^admin/>], [<RegexURLResolver <module 'iep.category_urls' from '/home/cseuser/sites/iep/apps/iep/category_urls.pyc'> (None:None) ^category/>], [<RegexURLResolver <module 'iep.news_urls' from '/home/cseuser/sites/iep/apps/iep/news_urls.pyc'> (None:None) ^news/>], [<RegexURLResolver <module 'iep.content_urls' from '/home/cseuser/sites/iep/apps/iep/content_urls.pyc'> (None:None) ^content/>], [<RegexURLResolver <module 'iep.topic_tree_urls' from '/home/cseuser/sites/iep/apps/iep/topic_tree_urls.pyc'> (None:None) ^topic-tree/>], [<RegexURLResolver <module 'iep.directory_urls' from '/home/cseuser/sites/iep/apps/iep/directory_urls.pyc'> (None:None) ^directory/>], [<RegexURLResolver <module 'newsletter.urls' from '/home/cseuser/sites/iep/apps/newsletter/urls.pyc'> (None:None) ^newsletter/>], [<RegexURLResolver <module 'iep.search_urls' from '/home/cseuser/sites/iep/apps/iep/search_urls.pyc'> (None:None) ^search/>], [<RegexURLResolver <module 'iep.embed_urls' from '/home/cseuser/sites/iep/apps/iep/embed_urls.pyc'> (None:None) ^embed/>], [<RegexURLResolver <module 'iep.feed_urls' from '/home/cseuser/sites/iep/apps/iep/feed_urls.pyc'> (None:None) >, <RegexURLPattern site-rss-feed ^rss.xml$>], [<RegexURLResolver <module 'iep.feed_urls' from '/home/cseuser/sites/iep/apps/iep/feed_urls.pyc'> (None:None) >, <RegexURLPattern top-news-rss-feed ^news/top/rss.xml$>], [<RegexURLResolver <module 'iep.feed_urls' from '/home/cseuser/sites/iep/apps/iep/feed_urls.pyc'> (None:None) >, <RegexURLPattern category-rss-feed ^category/(?P<pk>\d+)/(?P<slug>[\w_-]+)/rss.xml$>], [<RegexURLResolver <module 'iep.social_urls' from '/home/cseuser/sites/iep/apps/iep/social_urls.pyc'> (None:None) >, <RegexURLPattern content-social-page ^node/(?P<pk>\d+)/$>], [<RegexURLResolver <module 'iep.social_urls' from '/home/cseuser/sites/iep/apps/iep/social_urls.pyc'> (None:None) >, <RegexURLPattern taxonomy-social-page ^taxonomy/term/(?P<pk>\d+)/$>]]},) |
middleware_method | <bound method Handle404.process_response of <iep.middleware.Handle404 object at 0x15070b10>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x14ebdf50> |
request | "<WSGIRequest\npath:/;,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'HTTP_ACCEPT': '*/*',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'indiaenvironmentportal.org.in',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '34.204.3.195',\n 'PATH_INFO': u'/;',\n 'QUERY_STRING': '',\n 'RAW_URI': '/;',\n 'REMOTE_ADDR': '34.204.3.195',\n 'REMOTE_PORT': '80',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'indiaenvironmentportal.org.in',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'gunicorn/18.0',\n 'gunicorn.socket': <socket._socketobject object at 0x16da5d00>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x2b22e8cd81e0>,\n 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x137cb7d0>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x15a59990>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
resolver | <RegexURLResolver 'iep_site.urls' (None:None) ^/> |
response | <django.http.response.HttpResponseNotFound object at 0x15b68910> |
urlconf | 'iep_site.urls' |
/home/cseuser/sites/iep/apps/iep/middleware.py
in process_response
from drupal.models import UrlAlias, Node, TaxonomyTermData
class Handle404(object):
def process_response(self, request, response):
if response.status_code == 404:
url_path = request.META.get('PATH_INFO','')
if url_path[-4].lower() == '.':...
# possibly file
return response
query = Q(alias=url_path[1:])
if url_path[-1] == '/':
query = query | Q(alias=url_path[1:-1])
Variable | Value |
---|---|
self | <iep.middleware.Handle404 object at 0x15070b10> |
url_path | u'/;' |
request | "<WSGIRequest\npath:/;,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'HTTP_ACCEPT': '*/*',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'indiaenvironmentportal.org.in',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '34.204.3.195',\n 'PATH_INFO': u'/;',\n 'QUERY_STRING': '',\n 'RAW_URI': '/;',\n 'REMOTE_ADDR': '34.204.3.195',\n 'REMOTE_PORT': '80',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'indiaenvironmentportal.org.in',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'gunicorn/18.0',\n 'gunicorn.socket': <socket._socketobject object at 0x16da5d00>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x2b22e8cd81e0>,\n 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x137cb7d0>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x15a59990>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
response | <django.http.response.HttpResponseNotFound object at 0x15b68910> |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SOFTWARE | 'gunicorn/18.0' |
SCRIPT_NAME | u'' |
wsgi.input | <gunicorn.http.body.Body object at 0x15a59990> |
REQUEST_METHOD | 'GET' |
HTTP_HOST | 'indiaenvironmentportal.org.in' |
PATH_INFO | u'/;' |
wsgi.multithread | False |
QUERY_STRING | '' |
HTTP_CONNECTION | 'close' |
HTTP_ACCEPT | '*/*' |
HTTP_USER_AGENT | 'claudebot' |
wsgi.version | (1, 0) |
REMOTE_PORT | '80' |
RAW_URI | '/;' |
REMOTE_ADDR | '34.204.3.195' |
wsgi.run_once | False |
wsgi.errors | <open file '<stderr>', mode 'w' at 0x2b22e8cd81e0> |
wsgi.multiprocess | True |
wsgi.url_scheme | 'http' |
gunicorn.socket | <socket._socketobject object at 0x16da5d00> |
SERVER_NAME | 'indiaenvironmentportal.org.in' |
SERVER_PORT | '80' |
HTTP_X_FORWARDED_FOR | '34.204.3.195' |
wsgi.file_wrapper | '' |
iep_site.conf.settings
Setting | Value |
---|---|
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'en-us' |
ROOT_URLCONF | 'iep_site.urls' |
MANAGERS | () |
DEFAULT_CHARSET | 'utf-8' |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
STATIC_ROOT | '/home/cseuser/sites/iep/public_html/static' |
FILES_COURSE_IMAGES_ROOT | '/home/cseuser/sites/iep/public_html/media/files/course/images' |
ALLOWED_HOSTS | ['.indiaenvironmentportal.org.in', '.indiaenvironmentportal.org.in.', '.environmentportal.in', '.environmentportal.in.'] |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
SEND_BROKEN_LINK_EMAILS | False |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
ADMIN_FOR | () |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': '180.179.212.61', 'NAME': 'db_iep', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': 'iepuser'}} |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') |
DEFAULT_CONTENT_TYPE | 'text/html' |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
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': 'redis_cache.cache.RedisCache', 'LOCATION': '127.0.0.1:6379:1', 'OPTIONS': {'CLIENT_CLASS': 'redis_cache.client.DefaultClient', 'DB': 1}}} |
PRECOMPILERS | {'text/coffeescript': '/usr/local/node_modules/coffee-script/bin/coffee --compile {infile}', 'text/less': '/usr/local/node_modules/less/bin/lessc {infile} {outfile}', 'text/x-sass': 'sass {infile} {outfile}', 'text/x-scss': 'sass --scss {infile} {outfile}'} |
SERVER_EMAIL | 'root@localhost' |
SESSION_COOKIE_PATH | '/' |
DEPLOYMENT | 'PROD' |
HAYSTACK_DEFAULT_OPERATOR | 'OR' |
FILES_PEOPLE_IMAGES_ROOT | '/home/cseuser/sites/iep/public_html/media/files/people/images' |
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', 'iep.middleware.Handle404') |
USE_I18N | True |
THOUSAND_SEPARATOR | ',' |
SECRET_KEY | u'********************' |
DISQUS_API_KEY | u'********************' |
LANGUAGE_COOKIE_NAME | 'django_language' |
COMPILED_EXTS | {'text/coffeescript': '.js', 'text/less': '.css'} |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_SETTINGS | <module 'django.conf.global_settings' from '/home/cseuser/env/iep/lib/python2.6/site-packages/django/conf/global_settings.pyc'> |
TRANSACTIONS_MANAGED | False |
LOGGING_CONFIG | 'django.utils.log.dictConfig' |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
WSGI_APPLICATION | 'iep_site.wsgi.application' |
TEMPLATE_DEBUG | True |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
HAYSTACK_CONNECTIONS | {'default': {'ENGINE': 'seeker.seeker.SolrEngine', 'URL': 'http://solr1:8080/solr/iep'}, 'dte': {'ENGINE': 'haystack.backends.solr_backend.SolrEngine', 'URL': 'http://solr1:8080/solr/dte'}} |
FORCE_SCRIPT_NAME | None |
USE_X_FORWARDED_HOST | False |
USE_ETAGS | False |
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', 'registration', 'bootstrap_toolkit', 'south', 'haystack', 'google_analytics', 'django_social_share', 'disqus', 'gunicorn', 'drupal', 'iep', 'newsletter', 'mt.core', 'mt.jquery', 'mt.ckeditor') |
LANGUAGES | (('en', 'English'),) |
COMMENTS_ALLOW_PROFANITIES | False |
STATICFILES_DIRS | () |
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' |
AUTH_USER_MODEL | 'auth.User' |
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 |
ADMIN_MEDIA_PREFIX | '/static/admin/' |
NUMBER_GROUPING | 0 |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_COOKIE_PATH | '/' |
LOGIN_REDIRECT_URL | '/' |
DECIMAL_SEPARATOR | '.' |
IGNORABLE_404_URLS | () |
LOCALE_PATHS | ('/home/cseuser/sites/iep/apps/locale',) |
TEMPLATE_STRING_IF_INVALID | '' |
HAYSTACK_LIMIT_TO_REGISTERED_MODELS | False |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | False |
FIXTURE_DIRS | ('/home/cseuser/sites/iep/apps/fixtures',) |
EMAIL_HOST | 'localhost' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '/home/cseuser/sites/iep/public_html/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 | ('/home/cseuser/sites/iep/apps/templates',) |
SITE_ID | 1 |
DISALLOWED_USER_AGENTS | () |
ALLOWED_INCLUDE_ROOTS | () |
LOGGING | {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'formatters': {'simple': {'format': '%(levelname)s %(message)s'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'formatter': 'simple', 'level': 'DEBUG'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}, 'mt': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': True}}, 'version': 1} |
SHORT_DATE_FORMAT | 'm/d/Y' |
APP_NAME | 'iep_site' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
TIME_ZONE | 'Asia/Kolkata' |
SOUTH_MIGRATION_MODULES | {} |
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', 'django.core.context_processors.request') |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'iep_site.conf.settings' |
FEINCMS_RICHTEXT_INIT_TEMPLATE | 'admin/content/richtext/init_ckeditor.html' |
SITE_ROOT | '/home/cseuser/sites/iep' |
LANGUAGES_BIDI | ('he', 'ar', 'fa', 'ur') |
FILE_UPLOAD_TEMP_DIR | None |
INTERNAL_IPS | () |
STATIC_URL | '/static/' |
EMAIL_PORT | 25 |
USE_TZ | True |
FEINCMS_RICHTEXT_INIT_CONTEXT | {'CKEDITOR_JS_URL': '/static/js/ckeditor/ckeditor.js', 'TINYMCE_JS_URL': '/static/js/tiny_mce/tiny_mce.js'} |
PASSWORD_HASHERS | u'********************' |
ABSOLUTE_URL_OVERRIDES | {} |
CACHE_MIDDLEWARE_SECONDS | 600 |
CSRF_COOKIE_HTTPONLY | False |
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') |
DISQUS_WEBSITE_SHORTNAME | 'indianenvironment' |
EMAIL_HOST_USER | '' |
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.