Last active
February 6, 2017 05:59
-
-
Save canabady/8edcbf0b4a19fd6905ca59a15af245c0 to your computer and use it in GitHub Desktop.
How to fix: UnicodeDecodeError: 'ascii' codec can't decode byte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to fix: “UnicodeDecodeError: 'ascii' codec can't decode byte” | |
# ----------------------------------------------------------------- | |
# Add the below code in the heading of python file | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment