mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-26 07:25:51 +03:00
[GH-ISSUE #242] manage smtpd has uncaught python exception: 'str' object has no attribute 'decode' #175
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nogweii on GitHub (Apr 16, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/242
Sample log message:
Seems like it happens every time an email arrives. Fails on attempting to decode a string which is already a unicode string 'cause Python 3 defaults to that:
github.com/healthchecks/healthchecks@143c90674b/hc/api/management/commands/smtpd.py (L18-L29)Running healthchecks 1.6.0 on an Ubuntu 16.04 system, running python 3.5.3.
@nogweii commented on GitHub (Apr 16, 2019):
Commenting out lines 25 through 28 seem to make it work with no heartache, though we haven't set up any subject line tests yet.
@cuu508 commented on GitHub (Apr 16, 2019):
Looks like the default value of the
decode_dataargument in SMTPServer constructor changed between Python 3.5 and Python 3.6.There was even a warning about that, which I had missed: https://github.com/python/cpython/blob/3.5/Lib/smtpd.py#L650
Just pushed a change that sets an explicit decode_data=False value. I'll be honest, I only tested it with Python 3.6.7 which I have installed locally. Would you be able to test it with 3.5 and confirm it works?