1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
self = <remarkbox.test_views.UnauthenticatedFunctionalTests testMethod=test_user_settings_redirects>

    def test_user_settings_redirects(self):
>       redirect_res = self.testapp.get("/u/settings", status=302)

remarkbox/test_views.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.env/lib/python3.7/site-packages/webtest/app.py:328: in get
    expect_errors=expect_errors)
.env/lib/python3.7/site-packages/webtest/app.py:623: in do_request
    res = req.get_response(app, catch_exc_info=True)
.env/lib/python3.7/site-packages/webob/request.py:1310: in send
    application, catch_exc_info=True)
.env/lib/python3.7/site-packages/webob/request.py:1278: in call_application
    app_iter = application(self.environ, start_response)
.env/lib/python3.7/site-packages/webtest/lint.py:201: in lint_app
    iterator = application(environ, start_response_wrapper)
.env/lib/python3.7/site-packages/pyramid/router.py:270: in __call__
    response = self.execution_policy(environ, self)
.env/lib/python3.7/site-packages/pyramid_retry/__init__.py:121: in retry_policy
    response = router.invoke_request(request)
.env/lib/python3.7/site-packages/pyramid/router.py:252: in invoke_request
    request._process_response_callbacks(response)
.env/lib/python3.7/site-packages/pyramid/request.py:83: in _process_response_callbacks
    callback(self, response)
.env/lib/python3.7/site-packages/pyramid/session.py:337: in set_cookie_callback
    self._set_cookie(response)
.env/lib/python3.7/site-packages/pyramid/session.py:410: in _set_cookie
    serializer.dumps((self.accessed, self.created, dict(self)))
.env/lib/python3.7/site-packages/webob/cookies.py:660: in dumps
    sig = hmac.new(self.salted_secret, cstruct, self.digestmod).digest()
/usr/lib64/python3.7/hmac.py:153: in new
    return HMAC(key, msg, digestmod)
/usr/lib64/python3.7/hmac.py:93: in __init__
    self.update(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hmac.HMAC object at 0x7f68f94007d0>
msg = '[1583199688, 1583199688.636834, {"_f_": [["You must log in to access that area.", "error"]]}]'

    def update(self, msg):
        """Update this hashing object with the string msg.
        """
>       self.inner.update(msg)
E       TypeError: Unicode-objects must be encoded before hashing

/usr/lib64/python3.7/hmac.py:102: TypeError