Fix UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u2026’ – Python Tutorial

By | October 27, 2021

We you are using python to crawl a web page, you may get this error: UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u2026’. In this tutorial, we will introduce you how to fix it.

Fix UnicodeEncodeError - 'latin-1' codec can't encode character 'u2026'

How to fix this unicode encode error?

As to us, you can check your http request header.

UnicodeEncodeError 'latin-1' codec can't encode character u2026

We can find there is a string in our http request header.

We remove it and find this error is fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *