title: geopy.exc.GeocoderAuthenticationFailure: HTTP Error 401: Unauthorized
body: <p>I'm trying to get the latitude and longitude of a location using GeoPy with Python. I tried implementing <a href="https://stackoverflow.com/questions/13686001/python-module-for-getting-latitude-and-longitude-from-the-name-of-a-us-city#13686031">this question</a>, as below:</p>
  
  <pre class="lang-py prettyprint-override"><code>from geopy.geocoders import GeoNames
  gn = GeoNames(username='[my username]')
  gn.geocode("Cleveland, OH 44106")
  </code></pre>
  
  <p>But I get this error: </p>
  
  <blockquote>
    <p>geopy.exc.GeocoderAuthenticationFailure: HTTP Error 401: Unauthorized</p>
  </blockquote>
  
  <p>I am registered on <a href="http://www.geonames.org" rel="nofollow noreferrer">http://www.geonames.org</a>, and I also tried looking at <a href="https://stackoverflow.com/questions/51503389/geopy-exc-geocoderinsufficientprivileges-http-error-403-forbidden">this question</a> but I get the same error, unless the <code>user_agent</code> has to be specified somewhere with <a href="http://www.geonames.org" rel="nofollow noreferrer">http://www.geonames.org</a>?</p>
  
  <p>What am I doing wrong?</p>