Forums

Error: Cannot connect to host dataservice.accuweather.com:443 ssl:default [Connect call failed ('52.202.61.201', 443)]

Hello i am building a simple python script to reach accuweather api. I get this error message i am guessing that PythonAnywhere is blocking trafic towards accuweather? Thank you

Any known work around?

Error: Cannot connect to host dataservice.accuweather.com:443 ssl:default [Connect call failed ('52.202.61.201', 443)]

Make sure that your code is using proxy. See https://help.pythonanywhere.com/pages/403ForbiddenError/#proxy-details

After a little bit of searching i was using a python module that would not allow me to set a proxy so i changed to another weather api "openweathermap". This one is working just fine without need to set a proxy manually. Thank you for the reply.

pip install pyowm

-----------

from pyowm.owm import OWM

owm = OWM('your_api_key_here')

mgr = owm.weather_manager()

observation = mgr.weather_at_place('London,GB')

weather = observation.weather

current_temp = weather.temperature('celsius')