Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Palantir Foundry forbids connection to external web service

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()
like image 247
stn53 Avatar asked Oct 20 '25 05:10

stn53


1 Answers

Code repositories by default have all the external communication disabled. To enable it you can follow this documentation: https://www.palantir.com/docs/foundry/transforms-python/external-transforms/

like image 93
Matija Herceg Avatar answered Oct 22 '25 05:10

Matija Herceg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!