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
# I fixed this error and also fixed the related blog post, you're welcome!
#
# Go here for the solution!
# 
# https://russell.ballestrini.net/quickstart-to-dkim-sign-email-with-python/
#

Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid_tm/compat.py", line 36, in reraise
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     raise value
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid_tm/__init__.py", line 143, in tm_tween
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     response = handler(request)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/tweens.py", line 43, in excview_tween
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     response = _error_handler(request, exc)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/tweens.py", line 17, in _error_handler
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     reraise(*exc_info)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/util.py", line 733, in reraise
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     raise value
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/tweens.py", line 41, in excview_tween
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     response = handler(request)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/router.py", line 144, in handle_request
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     registry, request, context, context_iface, view_name
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/view.py", line 674, in _call_view
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     response = view_callable(context, request)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/viewderivers.py", line 427, in rendered_view
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     result = view(context, request)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/pyramid/viewderivers.py", line 141, in _requestonly_view
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     response = view(request)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/remarkbox/views/authentication.py", line 97, in join_or_log_in
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     send_otp_email(request, user.email, raw_otp, email_return_to)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/remarkbox/lib/mail.py", line 148, in send_otp_email
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     send_remarkbox_email(request, to_email, subject, message_text, message_html)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/remarkbox/lib/mail.py", line 105, in send_remarkbox_email
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     dkim_selector,
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/remarkbox/lib/mail.py", line 75, in send_email
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     include_headers=headers,
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/dkim/__init__.py", line 1334, in sign
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     d = DKIM(message,logger=logger,signature_algorithm=signature_algorithm,linesep=linesep,tlsrpt=tlsrpt)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/dkim/__init__.py", line 504, in __init__
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     self.set_message(message)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/dkim/__init__.py", line 607, in set_message
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     self.headers, self.body = rfc822_parse(message)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/www/demo.remarkbox.com/env/lib/python3.6/site-packages/dkim/__init__.py", line 340, in rfc822_parse
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     lines = re.split(b"\r?\n", message)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:   File "/usr/lib/python3.6/re.py", line 212, in split
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]:     return _compile(pattern, flags).split(string, maxsplit)
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]: TypeError: cannot use a bytes pattern on a string-like object
Apr 19 10:46:39 remarkbox.com demo.remarkbox.com[15347]: [pid: 15559|app: -|req: -/-] 206.53.88.50 (-) {50 vars in 1749 bytes} [Mon Apr 19 10:46:38 2021] GET /embed/ns/russell.ballestrini.net/join-or-log-in?email=russell.ballestrini%40gmail.com&return-to=https%3A%2F%2Frussell.ballestrini.net%2Ffour2go-a-new-spin-on-an-old-classic%2F%230bffc1ea-a11e-11eb-9f5d-040140774501&submit=True => generated 0 bytes in 304 msecs (HTTP/1.0 500) 0 headers in 0 bytes (0 switches on core 5)