Skip to content
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

add_attech method with file suffix '.txt' error #29

Closed
targetoyes opened this issue Jul 27, 2015 · 3 comments
Closed

add_attech method with file suffix '.txt' error #29

targetoyes opened this issue Jul 27, 2015 · 3 comments

Comments

@targetoyes
Copy link

add_attech method with file’s suffix like '.txt' will be called something like this
File "/usr/lib/python2.6/site-packages/envelopes/envelope.py", line 329, in send
send_result = conn.send(self)
File "/usr/lib/python2.6/site-packages/envelopes/conn.py", line 87, in send
msg = envelope.to_mime_message()
File "/usr/lib/python2.6/site-packages/envelopes/envelope.py", line 292, in to_mime_message
msg.attach(MIMEText(part[1], type_min, self._charset))
File "/usr/lib64/python2.6/email/mime/text.py", line 30, in init
self.set_payload(_text, _charset)
File "/usr/lib64/python2.6/email/message.py", line 224, in set_payload
self.set_charset(charset)
File "/usr/lib64/python2.6/email/message.py", line 268, in set_charset
self._payload = charset.body_encode(self._payload)
File "/usr/lib64/python2.6/email/charset.py", line 387, in body_encode
return email.base64mime.body_encode(s)
File "/usr/lib64/python2.6/email/base64mime.py", line 147, in encode
enc = b2a_base64(s[i:i + max_unencoded])
File "/usr/lib64/python2.6/email/message.py", line 292, in getitem
return self.get(name)
File "/usr/lib64/python2.6/email/message.py", line 358, in get
name = name.lower()
AttributeError: 'slice' object has no attribute 'lower'

other suffix seems ok.

@thakkarparth007
Copy link

Please see #18. I've posted the fix there. I'll probably send a PR soon.

@thakkarparth007
Copy link

My bad. There's already a PR doing that. (#28)

@targetoyes
Copy link
Author

ok,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants