python3 - UnicodeEncodeError: 'ascii' codec can't encode character '\xe4'
<p>I am running into a <code>UnicodeEncodeError</code> with a file that I am processing in Python. I have gone through the number of SO entries with similar errors, but none work fix my situation (or do not give sufficient detail to apply them correctly to my problem).</p>

<p>Upon investigating, I've nailed the issue down to the following example:</p>

<pre><code>➜ python
Python 3.5.2 | packaged by conda-forge | (default, Jul  7 2016, 12:51:46)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; y = u'\xe4'
&gt;&gt;&gt; print(y)
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 0: ordinal not in range(128)

➜ echo $LANG
en_US.UTF-8
</code></pre>

<p>How might I resolve this?</p>