python geocoder fails with django
<p>This is so confusing, I have in my jupyter notebook:</p>

<pre><code>import geocoder
geocoder.google('94704')
</code></pre>

<p>receiving:</p>

<pre><code>&lt;[OK] Google - Geocode [Berkeley, CA 94704, USA]&gt;
</code></pre>

<p>Then this is part of a backend code, so I put this in my django project, and run it on the local server, and in postman i POST a JSON with the same argumen, 94704 and I am getting:
<a href="https://i.stack.imgur.com/SGV3J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SGV3J.png" alt="enter image description here"></a></p>

<p>This is the code just in case:</p>

<pre><code>def get_county(data):
    """Takes the data in the above format, returns the string of the county name"""
    if data['type']=='zip':
        postal = data['data']
        g = geocoder.google(postal)
    elif data['type']=='geo':
        lat,lon = data['data']
        g = geocoder.google([lat,lon], method='reverse')
    return ' '.join(g.county.split()[:-1])
</code></pre>

<p>Any ideas?</p>