Closed Animosity022 closed 6 years ago
Can you turn debug on in settings.py and give me the output at the top of the page? i need to see what list it cant see
Is this enough?
Ah it isnt showing it at the top. Follow the traceback till you get to a bold row. (dropdown the arrow too)
Ah.
Here is the full paste:
Environment:
Request Method: GET
Request URL: http://192.168.1.30:8001/settings
Django Version: 2.0.4
Python Version: 3.6.4
Installed Applications:
['amw.apps.AmwConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
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']
Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
89. return handler(request, *args, **kwargs)
File "/data/AutoMarkWatched/amw/views.py" in get
46. print(ServerInfo.objects.all()[0])
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in __getitem__
307. return qs._result_cache[0]
Exception Type: IndexError at /settings
Exception Value: list index out of range
I think I fixed it. Was a print i had for testing output. git pull
and try again for me
side note. I added the management command examples to the README so you can have it run automatically
Hmm. Did a git pull and restarted it and getting the same thing.
^C[felix@gemini AutoMarkWatched]$ git pull
remote: Counting objects: 20, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 20 (delta 12), reused 15 (delta 8), pack-reused 0
Unpacking objects: 100% (20/20), done.
From https://github.com/DirtyCajunRice/AutoMarkWatched
32867c1..16d6630 master -> origin/master
Updating 32867c1..16d6630
Fast-forward
README.md | 11 +++++++++++
amw/management/commands/filltable.py | 15 +++++++++++++++
amw/management/commands/markwatched.py | 15 +++++++++++++++
amw/management/commands/synctvdb.py | 15 +++++++++++++++
amw/views.py | 1 -
5 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 amw/management/commands/filltable.py
create mode 100644 amw/management/commands/markwatched.py
create mode 100644 amw/management/commands/synctvdb.py
[felix@gemini AutoMarkWatched]$ python3 manage.py runserver 0:8001
Same error I think:
Environment:
Request Method: GET
Request URL: http://192.168.1.30:8001/settings
Django Version: 2.0.4
Python Version: 3.6.4
Installed Applications:
['amw.apps.AmwConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
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']
Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
89. return handler(request, *args, **kwargs)
File "/data/AutoMarkWatched/amw/views.py" in get
49. 'serverinfo': ServerInfo.objects.all()[0]
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in __getitem__
307. return qs._result_cache[0]
Exception Type: IndexError at /settings
Exception Value: list index out of range
Ok. pull and try again for me.
context = {
'form': form,
'tvshows': TVShow.objects.all(),
'serverinfo': ServerInfo.objects.all()[0]
}
the serverinfo context was expecting the list to be populated.
Good. Working now. Thanks! No more Judge Judy in my feed.
Hahahah. Nice. Thanks for helping make it better!
I got the homepage to start up and when I click on the settings I get: