Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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()

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading