TemplateSyntaxError at /comments/posted/
Caught an exception while rendering: HTTP Error 401: Unauthorized
Original Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 888, in render
return func(*resolved_vars)
File "/var/www/vhosts/androidsnippets.org/django/androidsnippets/cab/templatetags/extra.py", line 141, in twitter_newComment
api.PostUpdate(msg)
File "build/bdist.linux-x86_64/egg/twitter.py", line 1490, in PostUpdate
File "build/bdist.linux-x86_64/egg/twitter.py", line 2014, in _FetchUrl
File "urllib2.py", line 364, in open
response = meth(req, response)
File "urllib2.py", line 471, in http_response
response = self.parent.error(
File "urllib2.py", line 396, in error
result = self._call_chain(*args)
File "urllib2.py", line 337, in _call_chain
result = func(*args)
File "urllib2.py", line 741, in http_error_401
host, req, headers)
File "urllib2.py", line 720, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "urllib2.py", line 730, in retry_http_basic_auth
return self.parent.open(req)
File "urllib2.py", line 364, in open
response = meth(req, response)
File "urllib2.py", line 471, in http_response
response = self.parent.error(
File "urllib2.py", line 402, in error
return self._call_chain(*args)
File "urllib2.py", line 337, in _call_chain
result = func(*args)
File "urllib2.py", line 480, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 401: Unauthorized
Request Method: GET
Request URL: http://www.androidsnippets.org/comments/posted/
Exception Type: TemplateSyntaxError
Exception Value:
Caught an exception while rendering: HTTP Error 401: Unauthorized
Original Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/__init__.py", line 888, in render
return func(*resolved_vars)
File "/var/www/vhosts/androidsnippets.org/django/androidsnippets/cab/templatetags/extra.py", line 141, in twitter_newComment
api.PostUpdate(msg)
File "build/bdist.linux-x86_64/egg/twitter.py", line 1490, in PostUpdate
File "build/bdist.linux-x86_64/egg/twitter.py", line 2014, in _FetchUrl
File "urllib2.py", line 364, in open
response = meth(req, response)
File "urllib2.py", line 471, in http_response
response = self.parent.error(
File "urllib2.py", line 396, in error
result = self._call_chain(*args)
File "urllib2.py", line 337, in _call_chain
result = func(*args)
File "urllib2.py", line 741, in http_error_401
host, req, headers)
File "urllib2.py", line 720, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "urllib2.py", line 730, in retry_http_basic_auth
return self.parent.open(req)
File "urllib2.py", line 364, in open
response = meth(req, response)
File "urllib2.py", line 471, in http_response
response = self.parent.error(
File "urllib2.py", line 402, in error
return self._call_chain(*args)
File "urllib2.py", line 337, in _call_chain
result = func(*args)
File "urllib2.py", line 480, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 401: Unauthorized
Exception Location: /usr/lib/python2.4/site-packages/django/template/debug.py in render_node, line 81
Python Executable: /usr/bin/python
Python Version: 2.4.4
Python Path: ['/var/www/vhosts/androidsnippets.org/django/', '/var/www/vhosts/androidsnippets.org/django/androidsnippets/', '/usr/lib/python2.4/site-packages/Trac-0.11.3-py2.4.egg', '/usr/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-x86_64.egg', '/usr/lib/python2.4/site-packages/Pygments-1.0-py2.4.egg', '/usr/lib/python2.4/site-packages/markdown-1.7-py2.4.egg', '/usr/lib/python2.4/site-packages/python_twitter-0.6_devel-py2.4.egg', '/usr/lib/python2.4/site-packages/simplejson-2.0.9-py2.4.egg', '/usr/lib/python2.4/site-packages/BeautifulSoup-3.1.0.1-py2.4.egg', '/usr/lib/python2.4/site-packages/python_memcached-1.44-py2.4.egg', '/usr/lib/python24.zip', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/var/lib/python-support/python2.4']
Server time: Thu, 27 Aug 2009 12:26:58 +0200
Template error
In template /usr/lib/python2.4/site-packages/django/contrib/comments/templates/comments/posted.html, error at line 16
Caught an exception while rendering: HTTP Error 401: Unauthorized
6
7 {% block main_content %}
8 <h1>Thank you for your comment!</h1>
9 <p><img alt="" src="http://androidsnippets.org/media/feed-icon-10x10.png"/> Do you want to subscribe to one of our feeds?
10 <ul><li><a class="n" href="http://feeds2.feedburner.com/AndroidSnippetsCombined">Latest Snippets & Comments</a></li>
11 <li><a class="n" href="http://feeds2.feedburner.com/AndroidSnippetsComments">Latest Comments</a></li>
12 <li><a class="n" href="http://feeds2.feedburner.com/AndroidSnippetsLatest">Latest Snippets</a></li></ul>
13 </p>
14
15 <p><br><big><a href="/snippets/{{ comment.object_pk }}/">Return to the Snippet</a></big></p>
16 {% twitter_newComment comment %}
17 {% endblock %}
18
19
20
Traceback Switch to copy-and-paste view
* /usr/lib/python2.4/site-packages/django/core/handlers/base.py in get_response
79. # Apply view middleware
80. for middleware_method in self._view_middleware:
81. response = middleware_method(request, callback, callback_args, callback_kwargs)
82. if response:
83. return response
84.
85. try:
86. response = callback(request, *callback_args, **callback_kwargs) ...
87. except Exception, e:
88. # If the view raised an exception, run it through exception
89. # middleware, and if the exception middleware returns a
90. # response, use that. Otherwise, reraise the exception.
91. for middleware_method in self._exception_middleware:
92. response = middleware_method(request, e)
▶ Local vars
Variable Value
callback
<function confirmed at 0x2b3df9703410>
callback_args
()
callback_kwargs
{}
e
<django.template.TemplateSyntaxError instance at 0x2b3df989bcb0>
exc_info
(<class django.template.TemplateSyntaxError at 0x2b3df900a830>, <django.template.TemplateSyntaxError instance at 0x2b3df989bcb0>, <traceback object at 0x2b3df989f0e0>)
exceptions
<module 'django.core.exceptions' from '/usr/lib/python2.4/site-packages/django/core/exceptions.pyc'>
middleware_method
<bound method OpenIDMiddleware.process_request of <django_authopenid.middleware.OpenIDMiddleware object at 0x2b3df83c1b90>>
receivers
[(<function _rollback_on_exception at 0x2b3df8f1b758>, None)]
request
<ModPythonRequest path:/snippets/comments/posted/, GET:<QueryDict: {u'c': [u'555']}>, POST:<QueryDict: {}>, COOKIES:{'__utma': '57555706.1078141276610844800.1251368539.1251368539.1251368539.1', '__utmb': '57555706.3.10.1251368539', '__utmc': '57555706', '__utmz': '57555706.1251368539.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=android%20vibrate'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': '__utma=57555706.1078141276610844800.1251368539.1251368539.1251368539.1; __utmb=57555706.3.10.1251368539; __utmc=57555706; __utmz=57555706.1251368539.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=android%20vibrate', 'HTTP_HOST': 'www.androidsnippets.org', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://www.androidsnippets.org/snippets/comments/post/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13', 'PATH_INFO': u'/comments/posted/', 'PATH_TRANSLATED': None, 'QUERY_STRING': 'c=555', 'REMOTE_ADDR': '58.156.2.18', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '/snippets', 'SERVER_NAME': 'androidsnippets.org', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
resolver
<RegexURLResolver androidsnippets.urls ^/>
response
None
self
<django.core.handlers.modpython.ModPythonHandler object at 0x2b3df7490490>
settings
<django.conf.LazySettings object at 0x2b3df819cb10>
urlconf
'androidsnippets.urls'
urlresolvers
<module 'django.core.urlresolvers' from '/usr/lib/python2.4/site-packages/django/core/urlresolvers.pyc'>
* /usr/lib/python2.4/site-packages/django/contrib/comments/views/utils.py in confirmed
39. if 'c' in request.GET:
40. try:
41. comment = comments.get_model().objects.get(pk=request.GET['c'])
42. except ObjectDoesNotExist:
43. pass
44. return render_to_response(template,
45. {'comment': comment},
46. context_instance=RequestContext(request) ...
47. )
48.
49. confirmed.__doc__ = textwrap.dedent("""\
50. %s
51.
52. Templates: `%s``
▶ Local vars
Variable Value
comment
<Comment: Nicolas Raoul: For this to work, you will have to add the android...>
request
<Mo