AttributeError: object 'module' does not have 'wraps' attribute


I am trying to get Django running on a shared hosting account for which I have ssh access, but I have been having issues getting it working. When I first tried running, I received an error about the module 'functools' being missing. I had the hosting company install the functools package, but now I get the following traceback when I try to run

Traceback (most recent call last):
  File "", line 2, in <module>
    from import execute_manager
  File "/usr/local/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/core/management/", line 3, in <module>
    from optparse import OptionParser, NO_DEFAULT
  File "/usr/local/lib/python2.6/", line 90, in <module>
    from gettext import gettext
  File "/usr/local/lib/python2.6/", line 49, in <module>
    import locale, copy, os, re, struct, sys
  File "/usr/local/lib/python2.6/", line 98, in <module>
AttributeError: 'module' object has no attribute 'wraps'

I opened a support ticket and was told by the company that they reinstalled Python 2.6, but that didn't change anything. I also tried with 2.4, which is also installed on the machine, but that resulted in the earlier ImportError: No module named functools error.

Does anybody have any ideas?

A likely cause is something shadowing the stdlib functools module. Do you have a alongside the main script ( See what import functools; print functools.__file__ prints, inside (before any of the other imports.) If it doesn't print /usr/local/lib/python2.6/, there's probably a file shadowing the standard library module. If it does print that, something is wrong with that file, reinstalls notwithstanding.