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!
Asked
Active
Viewed 966 times
-2
-
1Please see [question guidelines](https://stackoverflow.com/help/how-to-ask). Please share a code sample. – fzzylogic May 19 '21 at 08: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 May 19 '21 at 08:30
1 Answers
0
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.

Moenupa WANG
- 46
- 3