I am using python = 3.6 Can't able to get solution for this ? Can anyone help me to get a solution for this issue!
- 1Please see question guidelines. Please share a code sample.fzzylogic– fzzylogic2021-05-19 08:29:39 +00:00Commented May 19, 2021 at 8:29
- It means that the string you are trying to decode is not encoded using ascii. Try using different decoding format e.g. utf-8 or ask for the original encoding that was used,Pawan Sharma– Pawan Sharma2021-05-19 08:30:20 +00:00Commented May 19, 2021 at 8:30
Add a comment |
1 Answer
You can use b'\xef or some string here'.decode("utf-8", "ignore") to simply ignore such an error. Another way of doing it is to use a try-catch block.
And either way, you'd probably need to examine Python Docs on Unicode.
1 Comment
Kalaiselvi
Thanks for giving this solution!