You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey I was just doing stuff with geocoder and I reeally loved it. However I guess there is some issue in it here is the details:
As you can see ip.ok is giving True but ip.json.["ok"] is returning False which doesnot satisfy this statement "If geocoder was able to contact the server, but no result could be found for the given search terms, the ok attribute on the returned object will be False." from the docs.
The text was updated successfully, but these errors were encountered:
That is because the ok property on the return value tells you (as the docs say) if there is any result, but the IpInfo provider is coded to treat any response from the service as a “result”. It does look like the _adapt_results hook of IpinfoQuery incorrectly processes the response, but it is probably not going to be fixed anytime soon. Our only option is to check both values:
info = geocoder.ip( ... )
if info.ok and info.current_result.ok:
# This means the server could be contacted AND info about the IP could be fetched.
hey I was just doing stuff with geocoder and I reeally loved it. However I guess there is some issue in it here is the details:
As you can see ip.ok is giving True but ip.json.["ok"] is returning False which doesnot satisfy this statement "If geocoder was able to contact the server, but no result could be found for the given search terms, the ok attribute on the returned object will be False." from the docs.
The text was updated successfully, but these errors were encountered: