Use of horizon profile data lead to error 500 (Internal server error)
In the latest PVGIS version on the production server, when using the keyword PVGIS in the horizon profile section, external horizon profile data is expected to be used. However, this leads to a 500 Internal Server Error.
After some testing with a local instance in Development mode, there seems to be an issue with how the data is processed by PVGIS' dependency injection system. More specifically, when running a query with the PVGIS keyword for the horizon_profile variable:
curl -X 'GET' \
'http://127.0.0.1:8001/performance/broadband?longitude=8.628&latitude=45.812&elevation=214&surface_orientation=180&surface_tilt=45&start_time=2014-01-01T00%3A00%3A00&end_time=2014-12-31T23%3A59%3A59&frequency=Hourly&timezone=UTC&linke_turbidity_factor_series=2&horizon_profile=PVGIS&shading_model=PVGIS&photovoltaic_module=cSi%3AFree%20standing&system_efficiency=0.86&power_model=Huld%202011&peak-power=1&angle_output_units=Radians&analysis=Simple&statistics=false&groupby=None&verbose=0&index=false&quiet=false&fingerprint=false&quick_response_code=None&metadata=false&surface_position_optimisation_mode=None&surface_position_optimisation_method=L-BFGS-B&sampling_method_shgo=sobol&number_of_sampling_points=100&iterations=20' \
-H 'accept: application/json'
results to the following logging error:
File ".../pvis-be-prototype/pvgisprototype/api/series/utilities.py", line 495, in select_location_time_series
data = read_data_array_or_set(
^^^^^^^^^^^^^^^^^^^^^^^
File ".../pvis-be-prototype/pvgisprototype/api/series/utilities.py", line 276, in read_data_array_or_set
raise typer.Exit(code=33)
click.exceptions.Exit