Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:42:28+00:00 2026-05-24T15:42:28+00:00

I just got a new job working for a website and I am trying

  • 0

I just got a new job working for a website and I am trying to get a development server working on my work computer. I’ve copied all the configurations and what not and I am still getting errors.

When I try to display the front page I get

list index out of range

The exception is being raised

python2.6/site-packages/Django-1.3-py2.6.egg/django/db/models/query.py in __getitem__, line 190

Here is the traceback information.

Environment:


Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.3
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.sites',
 'django.contrib.flatpages',
 'django.contrib.markup',
 'south',
 'radio.frontend',
 'radio.events',
 'radio.library',
 'radio.logs',
 'radio.station',
 'radio.staff',
 'gravatar',
 'djcelery',
 'gunicorn']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')


Traceback:
File "/home/wluw/wluw/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/wluw/wluw/wluw/radio/frontend/views.py" in home
  20.     schedule = Schedule.objects.get_current_schedule(now)
File "/home/wluw/wluw/wluw/radio/station/managers.py" in get_current_schedule
  64.         return results[0]
File "/home/wluw/wluw/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/db/models/query.py" in __getitem__
  190.             return list(qs)[0]

Exception Type: IndexError at /
Exception Value: list index out of range

Here is some of the code I’ve got that is adding to the error

class ScheduleManager(models.Manager):
    def get_current_schedule(self, when):
        results = self.filter(start_date__lte=when, end_date__gte=when).order_by('-start_date')
        #try:
        #if(results[0]):
        return results[0]
        #else:
           # return "null"
        #
        #except IndexError:
            #raise self.model.DoesNotExist

    def get_current_schedule_or_404(self, when):
        try:
            return self.get_current_schedule(when)
        except self.model.DoesNotExist:
            raise Http404

I am still not to familiar with python so any suggestions of where to fiddle around with the code would be great.
I have a feeling it has something to do with database not being populated with data, but I added in stuff and I still get the error.

Thanks for any help you may give.

If you need more info just let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:42:29+00:00Added an answer on May 24, 2026 at 3:42 pm

    The traceback tells you what the problem is. The homepage is trying to display the top Schedule – but you don’t have any in your database. You need to create some.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We just got a new Windows 2008 R2 server and I am trying to
I just got a new machine (osx-lion), and I'm in the process of trying
I just got a new development box and am having issues getting my MVC
I have just got a new work PC from running Windows 7. I have
So, I just got a new 16-core server with AMD 6212 processors. I have
Just got the new iPad, and when I touch the microphone and say a
I've just got the new Visual Studio 2010 Ultimate and Javascript Intellisense is not
I've started using Coda because I just got a new Mac, and I want
I have an existing application (with MySQL DB). I just got a new requirement
I'm new to Django and just just got django-registration up and running. Could anyone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.