I want to query weather information using the meteostat
library. When doing so, however, Palantir Foundry forbids requests to the external web service. The code example below fails with the error message urllib.error.URLError: <urlopen error Tunnel connection failed: 403 Forbidden>
. What can I do about this?
from dateutil import parser as dateparser
from meteostat import Point, Hourly
loc = Point(47.00823, 4.849133)
start = dateparser.parse("2021-09-20 13:14:36+00:00")
end = dateparser.parse("2021-09-20 14:14:36+00:00")
# Queries information from an external source (fails!)
data = Hourly(loc, start, end)
data = data.fetch()