0

I have developed a piece of code to determine the solar output of pv facilities. I use an API for the PVGIS database toe extract irradiation data. For 2 months, the API worked perfectly. However, now the API does not work anymore. Below the code I use to extract data from PVGIS

pvgis_data, meta, inputs = pvlib.iotools.get_pvgis_hourly(
    latitude = latitude,
    longitude= longitude,
    start=2011,
    end=2020,
    raddatabase='PVGIS-SARAH2',
    components=True,
    surface_tilt= surface_tilt,
    surface_azimuth = surface_azimuth_pvgis,
    outputformat='json',
    usehorizon=True,
    userhorizon=None,
    pvcalculation=False,
    peakpower=None,  
    pvtechchoice='crystSi',
    mountingplace='free',
    loss=0,
    trackingtype=0,
    optimal_surface_tilt=False,
    optimalangles=False,
    url='https://re.jrc.ec.europa.eu/api/v5_2/',
    map_variables=True,
    timeout=50)

When I run the code now, I get the following error: ConnectionError: HTTPSConnectionPool(host='re.jrc.ec.europa.eu', port=443): Max retries exceeded with url: /api/v5_2/seriescalc?lat=51.979729&lon=5.9124&outputformat=json&angle=30&aspect=0&pvcalculation=0&pvtechchoice=crystSi&mountingplace=free&trackingtype=0&components=1&usehorizon=1&optimalangles=0&optimalinclination=0&loss=0&raddatabase=PVGIS-SARAH2&startyear=2011&endyear=2020 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000235A36020D0>: Failed to establish a new connection: [WinError 10060]

  • 1
    I ran the code above using pvlib==0.10.1 and it worked just fine. Try and change your pvlib version and alternatively try and run it from another computer. Based on the error message it seems to be a connection issue. – Adam R. Jensen Jul 29 '23 at 16:49

0 Answers0