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

  • Home
  • SEARCH
  • 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 3214960
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:07:19+00:00 2026-05-17T15:07:19+00:00

Django 1.1.2 & Python 2.6.5 I keep getting this error when executing a seemingly

  • 0

Django 1.1.2 & Python 2.6.5

I keep getting this error when executing a seemingly innocent queryset. Looks exactly like the issue described in http://code.djangoproject.com/ticket/7204 However, I’m running Django 1.1.2, which is supposed to have the fix for this bug. Has anybody dealt with something similar before?

Here’s the code that constructs the query:

def get_some_data(self, start_date, end_date):
    qset = Transaction.txn_objects.get_transactions_between(self.business,
                                                            start_date, 
                                                            end_date)
    income_qset = qset.filter(invoiceitem__invoice__customer = self)
    income_qset = income_qset.exclude(
                    account=F("invoiceitem__taxtypes__account_payable"))
    sums = income_qset.aggregate(models.Sum('credit_amount')) # fails here

Here’s an abridged version of the traceback (not very useful):

File ".../models.py" in get_income_between
  200.         sums = income_qset.aggregate(models.Sum('credit_amount'))
File ".../lib/python2.6/site-packages/django/db/models/query.py" in aggregate
  274.         query = self.query.clone()
File ".../lib/python2.6/site-packages/django/db/models/sql/query.py" in clone
  201.         obj.where = deepcopy(self.where, memo=memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  173.                 y = copier(memo)
File ".../lib/python2.6/site-packages/django/utils/tree.py" in __deepcopy__
  61.         obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_list
  228.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  173.                 y = copier(memo)
File ".../lib/python2.6/site-packages/django/utils/tree.py" in __deepcopy__
  61.         obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_list
  228.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  173.                 y = copier(memo)
File ".../lib/python2.6/site-packages/django/utils/tree.py" in __deepcopy__
  61.         obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_list
  228.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  173.                 y = copier(memo)
File ".../lib/python2.6/site-packages/django/utils/tree.py" in __deepcopy__
  61.         obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_list
  228.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_tuple
  235.         y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  338.             state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  162.         y = copier(x, memo)
File "/usr/lib/python2.6/copy.py" in _deepcopy_dict
  255.         y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py" in deepcopy
  189.                 y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py" in _reconstruct
  323.     y = callable(*args)
File "/usr/lib/python2.6/copy_reg.py" in __newobj__
  93.     return cls.__new__(cls, *args)

Exception Type: TypeError at /reports/income_expense/by_customer/32/
Exception Value: instancemethod expected at least 2 arguments, got 0
  • 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-17T15:07:19+00:00Added an answer on May 17, 2026 at 3:07 pm

    For the benefit of whoever else might run into this, the error is caused by a combination of using django-multilingual and django.db’s F object. Rewriting the code to eliminate F objects solved the issue.

    The root cause is actually a bug in Python, for more info see http://bugs.python.org/issue1515

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

Sidebar

Related Questions

Regarding Django & Python: The Error: Exception Type: DatabaseError Exception Value: column objects_thing.name_id does
I'm getting on quite well with Django & Python, just got a search function
Is there a TimThumb - like script for Django/Python? It's a image crop&rezise&cache script.
Learning django & python. Just set up a new site after doing the tutorial.
I'm new to Python & Django. I want to allow users to create new
I have an OSQA (python / django q&a application) installation serving 8 different sites.
I'm just learning Python & Django. (Thanks to everyone who contributes here -- it's
I have MYSQL & MYSQLdb installed with Python 2.6 & Django 1.2.3. I can
Note: Django 1.3 thingy is my experimental app's name. been learning Python & Django
Is it possible to run Python & Django on IIS? I am going to

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.