'NoneType' object has no attribute 'streaming'
Request Method: | GET |
---|---|
Request URL: | http://www.itdp-china.org/wherehome/ |
Django Version: | 1.11.11 |
Exception Type: | AttributeError |
Exception Value: | 'NoneType' object has no attribute 'streaming' |
Exception Location: | C:\Python34\lib\site-packages\django\middleware\cache.py in process_response, line 80 |
Python Executable: | C:\Apache24\bin\httpd.exe |
Python Version: | 3.4.4 |
Python Path: | ['C:/itdpchina', 'C:\\Python34\\lib\\site-packages\\flup-1.0.3.dev20151210-py3.4.egg', 'C:\\Python34\\lib\\site-packages\\aliyun_python_sdk_core_v3-2.13.11-py3.4.egg', 'C:\\Python34\\lib\\site-packages\\aliyun_python_sdk_kms-2.10.0-py3.4.egg', 'C:\\windows\\system32\\python34.zip', 'C:\\Python34\\Lib', 'C:\\Python34\\DLLs', 'C:\\Apache24', 'C:\\Apache24\\bin', 'C:\\Python34', 'C:\\Python34\\lib\\site-packages', 'C:\\Python34\\lib\\site-packages\\win32', 'C:\\Python34\\lib\\site-packages\\win32\\lib', 'C:\\Python34\\lib\\site-packages\\Pythonwin'] |
Server time: | 星期五, 29 三月 2024 16:57:19 +0800 |
C:\Python34\lib\site-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 | AttributeError("'NoneType' object has no attribute 'streaming'",) |
get_response | <bound method WSGIHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8>> |
request | <WSGIRequest: GET '/wherehome/'> |
C:\Python34\lib\site-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 0x00000000046CB1D0>> |
request | <WSGIRequest: GET '/wherehome/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8> |
C:\Python34\lib\site-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 whereHome at 0x0000000006301A60> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x00000000046B3D68>> |
request | <WSGIRequest: GET '/wherehome/'> |
resolver | <RegexURLResolver 'itdpchina.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=itdpweb.views.whereHome, args=(), kwargs={}, url_name=None, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8> |
wrapped_callback | <function whereHome at 0x0000000006301A60> |
C:\Python34\lib\site-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 whereHome at 0x0000000006301A60> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x00000000046B3D68>> |
request | <WSGIRequest: GET '/wherehome/'> |
resolver | <RegexURLResolver 'itdpchina.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=itdpweb.views.whereHome, args=(), kwargs={}, url_name=None, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8> |
wrapped_callback | <function whereHome at 0x0000000006301A60> |
C:\Python34\lib\site-packages\django\utils\decorators.py
in _wrapped_view
# has been rendered:
if hasattr(middleware, 'process_response'):
def callback(response):
return middleware.process_response(request, response)
response.add_post_render_callback(callback)
else:
if hasattr(middleware, 'process_response'):
return middleware.process_response(request, response)...
return response
return _wrapped_view
return _decorator
return _make_decorator
Variable | Value |
---|---|
args | () |
kwargs | {} |
middleware | <django.middleware.cache.CacheMiddleware object at 0x00000000062FEE48> |
request | <WSGIRequest: GET '/wherehome/'> |
response | None |
result | None |
view_func | <function whereHome at 0x0000000005ED3048> |
C:\Python34\lib\site-packages\django\middleware\cache.py
in process_response
def process_response(self, request, response):
"""Sets the cache, if needed."""
if not self._should_update_cache(request, response):
# We don't need to update the cache, just return.
return response
if response.streaming or response.status_code not in (200, 304):...
return response
# Don't cache responses that set a user-specific (and maybe security
# sensitive) cookie in response to a cookie-less request.
if not request.COOKIES and response.cookies and has_vary_header(response, 'Cookie'):
return response
Variable | Value |
---|---|
request | <WSGIRequest: GET '/wherehome/'> |
response | None |
self | <django.middleware.cache.CacheMiddleware object at 0x00000000062FEE48> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
COMSPEC | 'C:\\windows\\system32\\cmd.exe' |
CONTEXT_DOCUMENT_ROOT | 'C:/itdpchina' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | 'C:/itdpchina' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'www.itdp-china.org' |
HTTP_USER_AGENT | 'claudebot' |
PATHEXT | '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW' |
PATH_INFO | '/wherehome/' |
PATH_TRANSLATED | 'C:\\itdpchina\\itdpchina\\wsgi.py\\wherehome\\' |
QUERY_STRING | '' |
REMOTE_ADDR | '54.234.124.70' |
REMOTE_PORT | '34990' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/wherehome/' |
SCRIPT_FILENAME | 'C:/itdpchina/itdpchina/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '172.31.144.36' |
SERVER_ADMIN | 'admin@example.com' |
SERVER_NAME | 'www.itdp-china.org' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | '' |
SERVER_SOFTWARE | 'Apache/2.4.10 (Win64) OpenSSL/1.0.1j mod_wsgi/4.4.22 Python/3.4.4' |
SystemRoot | 'C:\\windows' |
WINDIR | 'C:\\windows' |
apache.version | (2, 4, 18) |
mod_wsgi.application_group | 'www.itdp-china.org|' |
mod_wsgi.callable_object | 'application' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
mod_wsgi.path_info | '/wherehome/' |
mod_wsgi.process_group | '' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_start | '1711702639677096' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1711702639678073' |
mod_wsgi.version | (4, 4, 22) |
wsgi.errors | <_io.TextIOWrapper encoding='utf-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <mod_wsgi.Input object at 0x00000000573240D0> |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
itdpchina.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['127.0.0.1', 'localhost', 'www.itdp-china.org', '*'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'itdpuser.ItdpUser' |
BASE_DIR | 'C:\\itdpchina' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'TIMEOUT': 600}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CORS_ALLOW_CREDENTIALS | True |
CORS_ALLOW_HEADERS | ('XMLHttpRequest', 'X_FILENAME', 'accept-encoding', 'authorization', 'content-type', 'dnt', 'origin', 'user-agent', 'x-csrftoken', 'x-requested-with', 'Pragma') |
CORS_ALLOW_METHODS | ('DELETE', 'GET', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'VIEW') |
CORS_ORIGIN_ALLOW_ALL | True |
CORS_ORIGIN_WHITELIST | ('*',) |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': '127.0.0.1', 'NAME': 'itdpchina2', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'anonuser'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
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'] |
DATE_FORMAT | 'N j, Y' |
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'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.126.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'ben216@126.com' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', '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 |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'itdpweb', 'photolib', 'itdpparking', 'itdpbike', 'itdpbrt', 'itdpmobile', 'docklessbike', 'itdpuser', 'corsheaders', 'DjangoUeditor'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('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'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'zh_Hans' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | 'C:\\itdpchina\\media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'itdpweb.middleware.RequestBlockingMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'itdpchina.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'ben216@126.com' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'itdpchina.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | 'C:\\itdpchina\\static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['C:\\itdpchina\\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']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'Asia/Singapore' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | False |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'itdpchina.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | '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.