On Sun, 2009-04-26 at 07:52 -0700, bobhaugen wrote: > Here's the traceback: > http://dpaste.com/38000/ > > Here's the code that triggered the error: > > swaps = Swap.objects.filter( > Q(state=2, proposing_offer__offerer=request.user) | > Q(state=2, responding_offer__offerer=request.user)).order_by("- > accepted_time")
That's a fragment of the code that triggers the error. Can you construct a very small, complete example that reliably shows the problem? From what you've provided, it's impossible for anybody but you to debug any further. At least as a starting point, try trimming down that fragment of code. There are about seven different things going on in that line alone, so it's time to start removing pieces and seeing what affects things. For example, you can try these options in isolation and various combinations: (1) Remove the order_by() call. Anything changed? (2) Remove one of the Q() condition from the filter. (3) Trim down the Q() calls to only involve a single keyword argument (either "state=2" or the responding_offer bit). (4) Try to trigger the problem without using Q-objects at all -- just a single filter name=value argument. Is the problem related to the particular fields involved? At that point, you'll be in a better position to try and construct a more limited model that only contains a single field or two and a short queryset that reliably triggers the problem. Then the problem can be examined in isolation. > This may be related: > http://code.djangoproject.com/ticket/7204 Not really, because you're not running the code that was causing the problem in that ticket. It was changed last June. Sure, it's the same error message, but that's the only similarity, since the code changes involved in fixing that, #7506 and a couple of other related reports involved removing code. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

