Wanted to investigate the csrf protection feature. Tried simple
2013-07-07 21:06:26,950 ERROR [waitress][Dummy-2] Exception when serving /api/wikis
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/waitress-0.8.5-py3.3.egg/waitress/channel.py", line 332, in service
task.service()
File "/usr/lib/python3.3/site-packages/waitress-0.8.5-py3.3.egg/waitress/task.py", line 174, in service
self.execute()
File "/usr/lib/python3.3/site-packages/waitress-0.8.5-py3.3.egg/waitress/task.py", line 382, in execute
app_iter = self.channel.server.application(env, start_response)
File "/usr/lib/python3.3/site-packages/pyramid/router.py", line 251, in __call__
response = self.invoke_subrequest(request, use_tweens=True)
File "/usr/lib/python3.3/site-packages/pyramid/router.py", line 227, in invoke_subrequest
response = handle_request(request)
File "/usr/lib/python3.3/site-packages/pyramid_debugtoolbar-1.0.6-py3.3.egg/pyramid_debugtoolbar/toolbar.py", line 130, in toolbar_tween
return handler(request)
File "/usr/lib/python3.3/site-packages/pyramid/tweens.py", line 21, in excview_tween
response = handler(request)
File "/usr/lib/python3.3/site-packages/pyramid_tm-0.7-py3.3.egg/pyramid_tm/__init__.py", line 82, in tm_tween
reraise(*exc_info)
File "/usr/lib/python3.3/site-packages/pyramid_tm-0.7-py3.3.egg/pyramid_tm/compat.py", line 13, in reraise
raise value
File "/usr/lib/python3.3/site-packages/pyramid_tm-0.7-py3.3.egg/pyramid_tm/__init__.py", line 63, in tm_tween
response = handler(request)
File "/usr/lib/python3.3/site-packages/pyramid/router.py", line 161, in handle_request
response = view_callable(context, request)
File "/usr/lib/python3.3/site-packages/pyramid/config/views.py", line 586, in __call__
return view(context, request)
File "/usr/lib/python3.3/site-packages/pyramid/config/views.py", line 319, in attr_view
return view(context, request)
File "/usr/lib/python3.3/site-packages/pyramid/config/views.py", line 295, in predicate_wrapper
return view(context, request)
File "/usr/lib/python3.3/site-packages/pyramid/config/views.py", line 345, in rendered_view
result = view(context, request)
File "/usr/lib/python3.3/site-packages/pyramid/config/views.py", line 491, in _requestonly_view
response = view(request)
File "/home/me/myapp/myapp/views.py", line 23, in listItems
print (request.session.get_csrf_token())
File "/usr/lib/python3.3/site-packages/pyramid_beaker-0.7-py3.3.egg/pyramid_beaker/__init__.py", line 88, in get_csrf_token
token = self.get('_csrft_', None)
File "/usr/lib/python3.3/site-packages/beaker/session.py", line 554, in __getattr__
return getattr(self._session(), attr)
File "/usr/lib/python3.3/site-packages/beaker/session.py", line 550, in _session
**params)
File "/usr/lib/python3.3/site-packages/beaker/session.py", line 112, in __init__
self._create_id()
File "/usr/lib/python3.3/site-packages/beaker/session.py", line 126, in _create_id
getpid())).hexdigest(),
TypeError: Unicode-objects must be encoded before hashing