'str' object has no attribute 'description'
Request Method: | GET |
---|---|
Request URL: | https://www.plantarmarihuana.net/tag/growshop-online-autoflorecientes/ |
Django Version: | 1.4.5 |
Exception Type: | AttributeError |
Exception Value: | 'str' object has no attribute 'description' |
Exception Location: | /home/web/plantarmarihuana/revista/views.py in news, line 151 |
Python Executable: | /usr/bin/uwsgi |
Python Version: | 2.7.5 |
Python Path: | ['/home/web/plantarmarihuana/', '.', '', '/root/src/spino', '/usr/lib/python2.7/site-packages/paapi5_python_sdk-1.0.0-py2.7.egg', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib/python2.7/site-packages'] |
Server time: | vie, 29 Mar 2024 12:32:17 +0100 |
/usr/lib/python2.7/site-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/lib/python2.7/site-packages/django/core/exceptions.pyc'> |
e | AttributeError("'str' object has no attribute 'description'",) |
callback_args | () |
settings | <django.conf.LazySettings object at 0x6dfdbafffb50> |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x6dfdb93e6610>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x6dfdb93c3b50> |
request | "<WSGIRequest\npath:/tag/growshop-online-autoflorecientes/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': '',\n 'CSRF_COOKIE': 'Z5xDOQGDpNoKZUZfATuurwvkYMvBmVH7',\n 'DOCUMENT_ROOT': '/home/web/plantarmarihuana',\n 'HTTPS': 'on',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_HOST': 'www.plantarmarihuana.net',\n 'HTTP_REFERER': 'http://www.plantarmarihuana.net/tag/growshop-online-autoflorecientes/',\n 'HTTP_USER_AGENT': 'claudebot',\n 'PATH_INFO': u'/tag/growshop-online-autoflorecientes/',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '3.91.203.238',\n 'REMOTE_PORT': '44930',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_SCHEME': 'https',\n 'REQUEST_URI': '/tag/growshop-online-autoflorecientes/',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'www.plantarmarihuana.net',\n 'SERVER_PORT': '443',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'uwsgi.node': 'ns3029649.ip-149-202-91.eu',\n 'uwsgi.version': '2.0.12',\n 'wsgi.errors': <open file 'wsgi_errors', mode 'w' at 0x6dfdb96054b0>,\n 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>,\n 'wsgi.input': <uwsgi._Input object at 0x6dfdb4b0a138>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'https',\n 'wsgi.version': (1, 0)}>" |
callback | <function news at 0x6dfdb4645050> |
resolver | <RegexURLResolver plantarmarihuana.urls (None:None) ^/> |
urlresolvers | <module 'django.core.urlresolvers' from '/usr/lib/python2.7/site-packages/django/core/urlresolvers.pyc'> |
callback_kwargs | {'title': u'tag/growshop-online-autoflorecientes'} |
response | None |
urlconf | 'plantarmarihuana.urls' |
/home/web/plantarmarihuana/revista/views.py
in news
news_relevant = mysql_custom_query('SELECT * FROM revista_post WHERE is_published=1 AND MATCH (title) AGAINST ("%s") limit 1;'% (title,))
if news_relevant:
return HttpResponsePermanentRedirect(u"/"+news_relevant[0].get("url","/"))
except Exception as e:
print "No existe ninguna relevante a:", title
return HttpResponsePermanentRedirect("/")
description_l = news.description.split('</p>')...
description = ""
total = len(description_l)
if total > 1:
for i,p in enumerate(description_l):
if i != total - 1:
description += p + '</p>'
Variable | Value |
---|---|
title | u'tag/growshop-online-autoflorecientes' |
news_flag | False |
request | "<WSGIRequest\npath:/tag/growshop-online-autoflorecientes/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': '',\n 'CSRF_COOKIE': 'Z5xDOQGDpNoKZUZfATuurwvkYMvBmVH7',\n 'DOCUMENT_ROOT': '/home/web/plantarmarihuana',\n 'HTTPS': 'on',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_HOST': 'www.plantarmarihuana.net',\n 'HTTP_REFERER': 'http://www.plantarmarihuana.net/tag/growshop-online-autoflorecientes/',\n 'HTTP_USER_AGENT': 'claudebot',\n 'PATH_INFO': u'/tag/growshop-online-autoflorecientes/',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '3.91.203.238',\n 'REMOTE_PORT': '44930',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_SCHEME': 'https',\n 'REQUEST_URI': '/tag/growshop-online-autoflorecientes/',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'www.plantarmarihuana.net',\n 'SERVER_PORT': '443',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'uwsgi.node': 'ns3029649.ip-149-202-91.eu',\n 'uwsgi.version': '2.0.12',\n 'wsgi.errors': <open file 'wsgi_errors', mode 'w' at 0x6dfdb96054b0>,\n 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>,\n 'wsgi.input': <uwsgi._Input object at 0x6dfdb4b0a138>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'https',\n 'wsgi.version': (1, 0)}>" |
post_relateds | '' |
news | '' |
numvideos | '' |
news_relevant | [] |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
wsgi.multiprocess | True |
HTTP_REFERER | 'http://www.plantarmarihuana.net/tag/growshop-online-autoflorecientes/' |
SCRIPT_NAME | u'' |
REQUEST_METHOD | 'GET' |
PATH_INFO | u'/tag/growshop-online-autoflorecientes/' |
SERVER_PROTOCOL | 'HTTP/1.1' |
QUERY_STRING | '' |
CONTENT_LENGTH | '' |
HTTP_USER_AGENT | 'claudebot' |
SERVER_NAME | 'www.plantarmarihuana.net' |
REMOTE_ADDR | '3.91.203.238' |
wsgi.url_scheme | 'https' |
SERVER_PORT | '443' |
uwsgi.node | 'ns3029649.ip-149-202-91.eu' |
DOCUMENT_ROOT | '/home/web/plantarmarihuana' |
wsgi.input | <uwsgi._Input object at 0x6dfdb4b0a138> |
HTTP_HOST | 'www.plantarmarihuana.net' |
HTTPS | 'on' |
wsgi.multithread | False |
REQUEST_URI | '/tag/growshop-online-autoflorecientes/' |
HTTP_ACCEPT | '*/*' |
wsgi.version | (1, 0) |
wsgi.run_once | False |
wsgi.errors | <open file 'wsgi_errors', mode 'w' at 0x6dfdb96054b0> |
REMOTE_PORT | '44930' |
REQUEST_SCHEME | 'https' |
uwsgi.version | '2.0.12' |
CONTENT_TYPE | '' |
wsgi.file_wrapper | '' |
CSRF_COOKIE | 'Z5xDOQGDpNoKZUZfATuurwvkYMvBmVH7' |
plantarmarihuana.settings
Setting | Value |
---|---|
FILEBROWSER_VERSIONS | {} |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'es-es' |
ROOT_URLCONF | 'plantarmarihuana.urls' |
LOGIN_URL | '/accounts/login/' |
DEFAULT_CHARSET | 'utf-8' |
STATIC_ROOT | '/usr/lib/python2.7/site-packages/plantarmarihuana/static/' |
FILEBROWSER_MEDIA_ROOT | 'https://www.plantarmarihuana.net/' |
ALLOWED_HOSTS | ['www.plantarmarihuana.net'] |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
SEND_BROKEN_LINK_EMAILS | False |
URL_VALIDATOR_USER_AGENT | 'Django/1.4.5 (https://www.djangoproject.com)' |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
FILEBROWSER_DIRECTORY | '' |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
ADMIN_FOR | () |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M') |
DATABASES | {'default': {'ENGINE': 'django.db.backends.mysql', 'HOST': '/home/mysql/mysql.sock', 'NAME': 'plantarmarihuana', 'OPTIONS': {'charset': 'utf8mb4', 'init_command': 'set names utf8'}, 'PASSWORD': u'********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'Europe/Madrid', 'USER': 'admin'}} |
FILE_UPLOAD_PERMISSIONS | None |
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': ''}} |
SERVER_EMAIL | 'root@localhost' |
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 | '' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
TRANSACTIONS_MANAGED | False |
LOGGING_CONFIG | 'django.utils.log.dictConfig' |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
FILEBROWSER_STATIC_URL | 'https://www.plantarmarihuana.net/static/' |
WSGI_APPLICATION | 'plantarmarihuana.wsgi.application' |
TEMPLATE_DEBUG | True |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
FORCE_SCRIPT_NAME | None |
CACHE_BACKEND | 'locmem://' |
FILEBROWSER_PATH_FILEBROWSER_MEDIA | 'https://www.plantarmarihuana.net/' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SESSION_COOKIE_SECURE | False |
FILEBROWSER_MEDIA_URL | 'https://www.plantarmarihuana.net/' |
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', 'django.contrib.sites', 'django.contrib.sitemaps', 'filebrowser', 'revista') |
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 | () |
FILEBROWSER_PATH_TINYMCE | '/usr/lib/python2.7/site-packages/plantarmarihuana/static/js/tinymce/' |
PREPEND_WWW | False |
SECURE_PROXY_SSL_HEADER | None |
SESSION_COOKIE_HTTPONLY | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
CSRF_COOKIE_DOMAIN | None |
FILEBROWSER_EXTENSIONS | {'Audio': ['.mp3', '.mp4', '.wav', '.aiff', '.midi', '.m4p'], 'Document': ['.pdf', '.doc', '.rtf', '.txt', '.xls', '.csv'], 'Image': ['.jpg', '.jpeg', '.gif', '.png', '.tif', '.tiff'], 'Video': ['.mov', '.wmv', '.mpeg', '.mpg', '.avi', '.rm']} |
MONTH_DAY_FORMAT | 'F j' |
MANAGERS | () |
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 |
ADMIN_MEDIA_PREFIX | '/static/admin' |
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/' |
DECIMAL_SEPARATOR | '.' |
IGNORABLE_404_URLS | () |
LOCALE_PATHS | () |
TEMPLATE_STRING_IF_INVALID | '' |
FILEBROWSER_MAX_UPLOAD_SIZE | '5242880000' |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | False |
FIXTURE_DIRS | () |
EMAIL_HOST | 'localhost' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '/home/revistas/media/plantarmarihuana/' |
DEFAULT_SETTINGS | <module 'django.conf.global_settings' from '/usr/lib/python2.7/site-packages/django/conf/global_settings.pyc'> |
ADMINS | () |
FORMAT_MODULE_PATH | None |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
MEDIA_URL | 'https://www.plantarmarihuana.net/' |
DATETIME_FORMAT | 'N j, Y, P' |
TEMPLATE_DIRS | ('/home/web/plantarmarihuana/templates',) |
SITE_ID | 1 |
DISALLOWED_USER_AGENTS | () |
ALLOWED_INCLUDE_ROOTS | () |
FILEBROWSER_URL_TINYMCE | 'https://www.plantarmarihuana.net/static/js/tinymce/' |
FILEBROWSER_ADMIN_VERSIONS | [] |
LOGGING | {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django': {'handlers': ['console'], 'level': 'INFO', 'propagate': True}, 'django.request': {'handlers': ['console'], 'level': 'ERROR', 'propagate': True}, 'revista.views': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': True}}, 'version': 1} |
SHORT_DATE_FORMAT | 'm/d/Y' |
TEST_RUNNER | 'django.test.simple.DjangoTestSuiteRunner' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
TIME_ZONE | 'Europe/Madrid' |
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', 'revista.context.common_data', 'django.core.context_processors.static', 'django.core.context_processors.request') |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'plantarmarihuana.settings' |
USE_ETAGS | False |
LANGUAGES_BIDI | ('he', 'ar', 'fa') |
FILE_UPLOAD_TEMP_DIR | '/home/tmp/plantarmarihuana' |
INTERNAL_IPS | () |
STATIC_URL | 'https://www.plantarmarihuana.net/static/' |
EMAIL_PORT | 25 |
USE_TZ | False |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
PASSWORD_HASHERS | u'********************' |
ABSOLUTE_URL_OVERRIDES | {} |
CACHE_MIDDLEWARE_SECONDS | 600 |
FILEBROWSER_NORMALIZE_FILENAME | True |
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 | '' |
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.