How to solve UnicodeDecodeError: 'ascii' codec can't decode byte

6 January 2018 · a minute to read

1. Problem

developing greek name days tweets a got that error

UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xcf in position 1: ordinal not in range(128)


2. Solution

setting those three lines as first lines in the ffending python cript

encoding=utf8

import sys

reload(sys) sys.setdefaultencoding(‘utf8’)

first

We then have to add a new entry to map the parent project from Artem:

second

We should be good to go now:

third

Or NOT?

fourth

Of course NOT! Till now, what we have been doing, was only about managing branches. In order to be able to checkout a Pindex.htmlull Request, we have to add the following line, in our .git/config :

fetch = +refs/pull/*/head:refs/remotes/origin/pr/*

So, after that my upstream reference looks like this:

fifth

I should now be able to finally fetch the PR, right?

sixth

Yes, we got it!!! We should be able to check it out using this git command:

git checkout origin/pr/11

Right?

seventh

YES!!!

3. Closing Quote

If it hurts, do it more often.