Closed jpaav closed 6 years ago
Returns The 'image' attribute has no file associated with it
The 'image' attribute has no file associated with it
Full error report:
Environment:
Request Method: GET Request URL: http://127.0.0.1:8000/groups/1/
Django Version: 1.11.7 Python Version: 3.6.3 Installed Applications: ['crispy_forms', 'gunicorn', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts', 'feed', 'alerts', 'sheets', 'info', 'groups', 'volunteerApp', 'organizer', 'utility'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware']
Template error: In template C:\Users\jpaavola\Documents\Code for Change\Sapphire-web\resources\templates\header_not_centered.html, error at line 8 The 'image' attribute has no file associated with it. 1 : 2 : <!DOCTYPE html> 3 : 4 :
Traceback:
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in _resolve_lookup
During handling of the above exception ('ImageFieldFile' object is not subscriptable), another exception occurred:
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\exception.py" in inner
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _legacy_get_response
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
File "C:\Users\jpaavola\Documents\Code for Change\Sapphire-web\groups\views.py" in group
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\shortcuts.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader.py" in render_to_string
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\backends\django.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in _render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render_annotated
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader_tags.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in resolve
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\fields\files.py" in url
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\fields\files.py" in _require_file
Exception Type: ValueError at /groups/1/ Exception Value: The 'image' attribute has no file associated with it.
Returns
The 'image' attribute has no file associated with it
Full error report:
Environment:
Request Method: GET Request URL: http://127.0.0.1:8000/groups/1/
Django Version: 1.11.7 Python Version: 3.6.3 Installed Applications: ['crispy_forms', 'gunicorn', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts', 'feed', 'alerts', 'sheets', 'info', 'groups', 'volunteerApp', 'organizer', 'utility'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware']
Template error: In template C:\Users\jpaavola\Documents\Code for Change\Sapphire-web\resources\templates\header_not_centered.html, error at line 8 The 'image' attribute has no file associated with it. 1 : 2 : <!DOCTYPE html> 3 : 4 :
5 : 6 : 7 : 8 : 9 : 10 :Traceback:
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in _resolve_lookup
During handling of the above exception ('ImageFieldFile' object is not subscriptable), another exception occurred:
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\exception.py" in inner
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _legacy_get_response
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
File "C:\Users\jpaavola\Documents\Code for Change\Sapphire-web\groups\views.py" in group
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\shortcuts.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader.py" in render_to_string
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\backends\django.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in _render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render_annotated
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader_tags.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in _render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render_annotated
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader_tags.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render_annotated
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in render
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in resolve
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in resolve
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\base.py" in _resolve_lookup
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\fields\files.py" in url
File "C:\Users\jpaavola\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\fields\files.py" in _require_file
Exception Type: ValueError at /groups/1/ Exception Value: The 'image' attribute has no file associated with it.