-2

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!

2
  • 1
    Please see question guidelines. Please share a code sample. Commented 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, Commented May 19, 2021 at 8:30

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for giving this solution!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.