I smell the sense of an end-of-line convention problem in django's debug view. Could it be your sourcefile uses '\r' for end of line where django expects a '\n' ??
On Apr 13, 8:12 am, "jonathan_ou" <[EMAIL PROTECTED]> wrote: > I am using python 2.5 with django 0.96 rev 5005 using mysql database. > When I try to cast a vote via web forms in part 4 of the tutorial, I > get the following error after I select a choice and submit the form: > > Traceback (most recent call last): > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/servers/basehttp.py", line 272, in > run > self.result = application(self.environ, self.start_response) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/servers/basehttp.py", line 614, in > __call__ > return self.application(environ, start_response) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/handlers/wsgi.py", line 189, in > __call__ > response = self.get_response(request) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/handlers/base.py", line 111, in > get_response > return debug.technical_500_response(request, *sys.exc_info()) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/views/debug.py", line 96, in > technical_500_response > pre_context_lineno, pre_context, context_line, post_context = > _get_lines_from_file(filename, lineno, 7) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/views/debug.py", line 175, in > _get_lines_from_file > context_line = source[lineno].strip('\n') > > IndexError: list index out of range > ------------------------------------------------------------------------------------------ > > The code and template html is directly copied from the tutorial > website (copy and paste). Yet for some reason this error continues to > pop up and django's own debug html page doesn't even load. The error > messages are entirely in plain text. > > Does anyone know how to solve this problem? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---