0
現在の気象データを緯度と経度で取得しようとしています。ここに私のPythonコードの一部です:openweathermap APIでエラーが発生しました
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))
それは、これを返します。
{"cod":"400","message":"96.95 is not a float"}
あなたは間違って何を知っていますか?