Please make sure that, your allow_url_fopen or cURL is enabled. Also, make sure your API key and location is correct. Verify your location from here https://openweathermap.org/find
PORTARIA 016/2019
PORTARIA 018/2019