When you are learning python programming, you may encounter this error: SyntaxError: Non-UTF-8 code starting with ‘\xe8’ in file. In this tutorial, we will introduce you how to fix this error.
This Non-UTF-8 error likes:
How to fix this SyntaxError?
To fix this SyntaxError is very easy, we should add code # -*- coding:utf-8 -*-
Here is an example:
# -*- coding:utf-8 -*- import hashlib import base64
Then you will find this error is fixed.