Convert .py files to correct encoding for Python 3
<p>I just pulled from a git repo where the users are on Python 2. My system is running Python 3 and with no changes in the code, I am getting this error:</p>

<pre><code>TabError: inconsistent use of tabs and spaces in indentation
</code></pre>

<p>It appears that the solution is to change the char set encoding of the <code>.py</code> files, but working in emacs, I'm not clear how to do this. I'm seeing these instructions:</p>

<p><a href="https://www.emacswiki.org/emacs/ChangingEncodings" rel="nofollow">https://www.emacswiki.org/emacs/ChangingEncodings</a></p>

<p>but I don't understand how to apply these for utf-8. I'd appreciate any suggestions.</p>

<p>This is not a python 2/3 issue, it looks like something in that git repo has wrong indentation. The easiest fix would be to replace all tab characters in all the files with spaces using something like sed</p>

python encoding emacs