On Thu, Jul 15, 2010 at 3:17 PM, shwetanka <shweta...@gmail.com> wrote:
> All of a sudden I'm being shown this error.
> Please if anyone knows tell me why i'm getting this error. I haven't
> changed debug.py at all.
>
>
> Traceback (most recent call last):
>
>  File "C:\Python26\lib\site-packages\django\core\servers
> \basehttp.py", line 280, in run
>    self.result = application(self.environ, self.start_response)
>
>  File "C:\Python26\lib\site-packages\django\core\servers
> \basehttp.py", line 674, in __call__
>    return self.application(environ, start_response)
>
>  File "C:\Python26\lib\site-packages\django\core\handlers\wsgi.py",
> line 241, in __call__
>    response = self.get_response(request)
>
>  File "C:\Python26\lib\site-packages\django\core\handlers\base.py",
> line 142, in get_response
>    return self.handle_uncaught_exception(request, resolver, exc_info)
>
>  File "C:\Python26\lib\site-packages\django\core\handlers\base.py",
> line 166, in handle_uncaught_exception
>    return debug.technical_500_response(request, *exc_info)
>
>  File "C:\Python26\lib\site-packages\django\views\debug.py", line 58,
> in technical_500_response
>    html = reporter.get_traceback_html()
>
>  File "C:\Python26\lib\site-packages\django\views\debug.py", line
> 109, in get_traceback_html
>    frames = self.get_traceback_frames()
>
>  File "C:\Python26\lib\site-packages\django\views\debug.py", line
> 228, in get_traceback_frames
>    pre_context_lineno, pre_context, context_line, post_context =
> self._get_lines_from_file(filename, lineno, 7, loader, module_name)
>
>  File "C:\Python26\lib\site-packages\django\views\debug.py", line
> 209, in _get_lines_from_file
>    context_line = source[lineno].strip('\n')
>
> IndexError: list index out of range
>

You've changed the .py file on disk, but not restarted the server, so
the code running doesn't compare to the code on disk. When you get a
stack trace, django line numbers etc from the stack, and matches them
to lines of source code read from the .py file - when the new .py file
is shorter than the old one, this could happen.
</wild_speculation>

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to