I am trying to have current weather data by latitude and longitude. Here is a part of my Python code:
import requests
def get_weather(lat, lon):
return requests.get(f'http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon},fr&appid=<MY API KEY>').json()
print(get_weather(96.95, 21.83))
It returns this:
{"cod":"400","message":"96.95 is not a float"}
Do you know what's wrong ?