-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
ordinal not in range(128) #24
Comments
I think this is related to #22. I haven't time to take a look at it, and I won't have time in the next month for personal reasons. What would be helpful, if it's not too private would be to have the original email that has been sent. Do you have this? |
I've aksed the sender to send the email again and the message produced the same issue. Then I've disabled zeyple and he send the message again. So the message that I've got now could help to trace down the issue. I'll send you the message to your email adress used in your github profile. |
Hey @acatton, keen to get your feedback on this. How do you usually solve those nasty ASCII/Unicode issues in Python while keeping compatibility for both Python 2 and 3? This comes up regularly and is a big PITA. Is it worth adding |
(Duplicate of #22) |
@infertux this problem is solved differently. Usually peope use Put I think here the real problem is bad typing. My goal is to make Zeyple 2.0 readable by mypy with [Python 2 annotations)(https://mypy.readthedocs.org/en/latest/python2.html) so that we get a better typing. I think the problem here is that nobody knows when is something unicode or byte. Type annotation (+ type checking) will solve the issue once and for all (IMHO). |
@acatton Thanks for the quick reply! Yeah IIRC the pgpme library spits out different types depending if you're running Python 2 or 3 which is pretty annoying... The type check idea sounds great. Meanwhile I'll see if I can fix that crap for Zeyple v1... Or maybe rewrite it in Ruby 😜 |
Hi @cscholz, Thanks for your patience. This should be fixed now (please reopen the issue if not). Here's a helper script to upgrade to v1.2.0: https://github.com/infertux/zeyple/blob/master/upgrade.sh |
Today one send forwarded me a bounce message from generated from zeple.
For the moment I don't have the original message send to zeyple to track the issue down.
The error reported is:
Command died with status 1: "/usr/local/bin/zeyple.py".
Command output: Traceback (most recent call last):
File "/usr/local/bin/zeyple.py", line 386, in zeyple.process_message(message, recipients) File "/usr/local/bin/zeyple.py", line 198, in process_message out_message = self._encrypt_message(in_message, key_id)
File "/usr/local/bin/zeyple.py", line 255, in _encrypt_message payload = payload.encode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 621: ordinal not in range(128)
The text was updated successfully, but these errors were encountered: