title: UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 49: character maps to <undefined>
body: <p>I am creating a certain function that can give me information regarding the ISS (International Space Station) and a given location (in decimal coordinates) that can vary, depending on the input. But when I use this: </p>
  
  <pre><code>print(ubicacion.raw['address']['country'],",",ubicacion.raw['address']['city'])
  </code></pre>
  
  <p>It works, but for certain countries, and for example when I try with the coordinates Canberra, it displays the following info:</p>
  
  <blockquote>
    <p>Corinna Street, Phillip, District of Woden Valley, Australian Capital Territory, 2606, Australia</p>
  </blockquote>
  
  <p>and since it doesn't provide the city, when I use the key <code>"city"</code>, I obviously get an error, since it doesn't exist in that list.</p>
  
  <p>So one solution that I got in my mind was that since at least I will always get the country, maybe I could use another function, that based on the country, I could get the capital city, which is the one I need and it exists, I used <code>"CountryInfo"</code> (<code>from countryinfo import CountryInfo</code>). The problem is, that when I try to use it, I get the following error:</p>
  
  <blockquote>
    <p>UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 49: character maps to </p>
  </blockquote>
  
  <p>I have already searched for similar questions and many people suggest to specify the encoding, but it seems to not work with <code>geopy</code>. since I tried this:</p>
  
  <pre><code>countryinfo=CountryInfo(country,encoding="utf8") 
  </code></pre>
  
  <p>and I got this error:</p>
  
  <blockquote>
    <p>TypeError: <strong>init</strong>() got an unexpected keyword argument 'encoding'</p>
  </blockquote>