On Dec 31 2008, 11:58 pm, gkelly <gke...@gmail.com> wrote:
> I am having the following error sent to my email from a live site. I
> haven't been able to reproduce the error myself, but was hoping
> someone could point me in the right direction as to how to solve this.
>
> First of all, is it something in my code, or in Django? The last line
> of the traceback says Django, but I think it's probably something I'm
> doing.
>
> Any ideas?
> Thanks,
> Grant
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python2.5/site-packages/django/core/handlers/
> base.py", line 86, in get_response
>     response = callback(request, *callback_args, **callback_kwargs)
>
>   File "/usr/lib/python2.5/site-packages/django/contrib/auth/
> decorators.py", line 67, in __call__
>     return self.view_func(request, *args, **kwargs)
>
>   File "/usr/local/src/wxcoder/observations/views.py", line 160, in
> enter
>     if form.is_valid():
>
>   File "/usr/lib/python2.5/site-packages/django/forms/forms.py", line
> 120, in is_valid
>     return self.is_bound and not bool(self.errors)
>
>   File "/usr/lib/python2.5/site-packages/django/forms/forms.py", line
> 111, in _get_errors
>     self.full_clean()
>
>   File "/usr/lib/python2.5/site-packages/django/forms/forms.py", line
> 241, in full_clean
>     self.cleaned_data = self.clean()
>
>   File "/usr/local/src/wxcoder/observations/forms.py", line 104, in
> clean
>     self.validate()
>
>   File "/usr/local/src/wxcoder/observations/forms.py", line 462, in
> validate
>     ]: validator(self.cleaned_data)
>
>   File "/usr/local/src/wxcoder/observations/forms.py", line 257, in
> ValidateGrossLimit
>     e = Element.objects.get(elementID=e_id)
>
>   File "/usr/lib/python2.5/site-packages/django/db/models/manager.py",
> line 93, in get
>     return self.get_query_set().get(*args, **kwargs)
>
>   File "/usr/lib/python2.5/site-packages/django/db/models/query.py",
> line 309, in get
>     % self.model._meta.object_name)
>
> TypeError: 'exceptions.IndexError' object is not callable
>

It's a bit hard to tell without seeing some code. I suspect though
that the error is in the __unicode__ method of your model - Django
seems to be getting the object, but then failing when it tries to repr
() it. Could you post the model code, preferably on dpaste.com?
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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