title: UnicodeEncodeError: 'utf-8' codec can't encode character '\udc43' in position 1: surrogates not allowed
body: <p>I have a list containing <code>placenames</code> and I want to create another array, initially empty, and then iterate the list of <code>placenames</code> and fill up my empty array with these <code>placenames</code>.</p>
  
  <p>For example, my first location is <code>'CHARTRIDGE'</code> and accessing this element in my <code>LOCARY</code> list via <code>LOCARY[S[0][0]]</code> I get: <code>'CHARTRIDGE'</code></p>
  
  <p>I created an empty array: <code>LOCLIST = np.empty([len(LOCARY),1])</code></p>
  
  <p>I then wrote a <code>for</code> loop to fill it up with the items from <code>LOCARY</code> using:</p>
  
  <pre><code>for i in range(len(LOCARY)):
      LOCLIST[i] = LOCARY[S[i][0]]
  </code></pre>
  
  <p>But I get the error:</p>
  
  <blockquote>
    <p>UnicodeEncodeError: 'utf-8' codec can't encode character '\udc43' in position 1: surrogates not allowed</p>
  </blockquote>
  
  <p>I'm wondering if it doesn't like the characters <code>'</code> in the <code>placename</code>.</p>
  
  <p>Any help would be appreciated, thank you.</p>