'tuple' object has no attribute 'has_header'

1,821 views
Skip to first unread message

Margie

unread,
Feb 23, 2009, 12:05:05 AM2/23/09
to Django users
Anyone know what might be causing this error? It occurs when I fill
in one of my forms (ie, from the use interface). I seem to never even
get to the view.py function that processes the POST.

Traceback (most recent call last):
File "/tools/aticad/1.0/external/python-2.5.1/lib/python2.5/site-
packages/django/core/servers/basehttp.py", line 277, in run
self.result = application(self.environ, self.start_response)
File "/tools/aticad/1.0/external/python-2.5.1/lib/python2.5/site-
packages/django/core/servers/basehttp.py", line 634, in __call__
return self.application(environ, start_response)
File "/tools/aticad/1.0/external/python-2.5.1/lib/python2.5/site-
packages/django/core/handlers/wsgi.py", line 243, in __call__
response = middleware_method(request, response)
File "/home/mlevine/django/chipvision7/chip_vision/apps/account/
middleware.py", line 28, in process_response
patch_vary_headers(response, ('Accept-Language',))
File "/tools/aticad/1.0/external/python-2.5.1/lib/python2.5/site-
packages/django/utils/cache.py", line 129, in patch_vary_headers
if response.has_header('Vary'):
AttributeError: 'tuple' object has no attribute 'has_header'

I believe my code is in the same state it was when it was working a
while back. I did some cleanup - removing img and .js files that
weren't in use. I've tried to put all that stuff back, but no luck
and this message isn't very informative ..

Anyway, any hints appreciated.

margie




Alex Gaynor

unread,
Feb 23, 2009, 12:08:08 AM2/23/09
to django...@googlegroups.com
You're view is returning a tuple insteaed of an HttpResponse object somewhere.

Alex


--
"I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire
"The people's good is the highest law."--Cicero

Margie

unread,
Feb 23, 2009, 12:11:13 AM2/23/09
to Django users
You are awesome, Alex. That was exactly it. Many thanks!

Margie

On Feb 22, 9:08 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages