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
[FIXED] # UnicodeError while handling a bug #762
base: master
Are you sure you want to change the base?
Conversation
Hii @cclauss, Please Review PR |
Co-authored-by: Christian Clauss <cclauss@me.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for doing this.
Hi @cclauss, As I am checking lint_python cases are failed due to isinstance(). May I do that changes or how this PR will be merged ? |
@iredmail @criptocoko Your reviews, please? |
Does this solve the scenario i presented?? because i think the problem is only for the attachments, not the message. The message is already handled here: Line 1483 in 0b67153
I attached the 2 scenarios('non ascii on the attach and the non ascii on the message') where the first one fails and second doesn't. |
This is exactly why tests are a great idea. |
Please resolve the git conflict. |
This error occurs when there is an attempt to encode a Unicode character that is not in the ASCII range (i.e., outside the range of 0 to 127) using the ASCII codec. The character in question in your case is '\u2019', which is the right single quotation mark.
Encode the message using a Unicode encoding that supports all characters, such as UTF-8. You can do this by changing the encoding parameter of the encode() method to 'utf-8'
close #757