Skip to content

Instantly share code, notes, and snippets.

@ucaiado
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save ucaiado/1f145b71171fe81a89b7 to your computer and use it in GitHub Desktop.

Select an option

Save ucaiado/1f145b71171fe81a89b7 to your computer and use it in GitHub Desktop.
Force your script be UTF-8
#Make sure that your script is in UTF-8. It is not the really a solution, but it is a quick fix
#source: http://stackoverflow.com/questions/5040532/python-ascii-codec-cant-decode-byte
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment