-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: spooler callable dictionary must contains only bytes #492
Comments
Could you try to apply the following patch: diff --git a/isso/ext/notifications.py b/isso/ext/notifications.py
index 7d62d72c2b34..8115516bdbeb 100644
--- a/isso/ext/notifications.py
+++ b/isso/ext/notifications.py
@@ -91,7 +91,8 @@ class SMTP(object):
def spooler(args):
try:
self._sendmail(args[b"subject"].decode("utf-8"),
- args["body"].decode("utf-8"))
+ args[b"body"].decode("utf-8"),
+ args[b"to"].decode("utf-8"))
except smtplib.SMTPConnectError:
return uwsgi.SPOOL_RETRY
else:
@@ -173,17 +174,17 @@ class SMTP(object):
notified.append(email)
def sendmail(self, subject, body, thread, comment, to=None):
+ to = to or self.conf.get("to")
if uwsgi:
uwsgi.spool({b"subject": subject.encode("utf-8"),
b"body": body.encode("utf-8"),
- b"to": to})
+ b"to": to.encode("utf-8")})
else:
start_new_thread(self._retry, (subject, body, to))
- def _sendmail(self, subject, body, to=None):
+ def _sendmail(self, subject, body, to_addr):
from_addr = self.conf.get("from")
- to_addr = to or self.conf.get("to")
msg = MIMEText(body, 'plain', 'utf-8')
msg['From'] = from_addr |
I directly applied your patch to the 0.11.1 release installed on my server. Now, I am getting a different error when creating a new comment.
|
On top of 0.11.1 should be fine. I am a bit lost why it was previously |
Okay, so I edited line 94 in notifications.py and changed Should I create a PR, so this issue gets fixed? |
Yes, you can open a PR. |
Fixed with PR #495 |
Hello,
I was running Isso 0.10.6 on my server and updated to the latest release (0.11.1).
Now, the mail notification does not work anymore when someone creates a new comment on my site.
I am getting the following error message:
ValueError: spooler callable dictionary must contains only bytes
I uploaded an attachement with the traceback to this issue.
When I downgrade back to version 0.10.6, it works again.
I am running Isso installed via pip in a virtualenv with uWSGI.
isso.log
The text was updated successfully, but these errors were encountered: