Forums

Python Newbie! Script won't run because of the following error :)

Trying to run and schedule my script. Scheduling worked, but running it succesfully did not :) . This is the error message I get:

requests.exceptions.ProxyError: HTTPSConnectionPool(host='forecast.metoceanapi.com', port=443): Max retries exceeded with url: /ocean/gfs/site?times=R56/2018 0928T090000Z/PT3H&lon=4.452934&lat=52.518350&units=nautical&apikey=XXX (Caused by ProxyError('Cannot connect to proxy.', OSError ('Tunnel connection failed: 403 Forbidden')))

(I changed the API key to XXX)

Could it be that the website is not whitelisted? If this is the case, I would love to put it up for submission! API docs: http://docs.forecast.metoceanapi.com/api-docs.html http://www.metocean.co.nz/apis/ http://www.metocean.co.nz

Yes, that looks like it's happening because you're trying to hit a site that's not on the whitelist. Could you try running the code again now? I've added both forecast.metoceanapi.com and stats.metoceanapi.com to the list.

Awesome! It works :) Thanks a bunch!

Thanks for confirming!