Closed AdamRJensen closed 1 year ago
I think that error message from the API is actually correct and, if anything is to be blamed for presenting the user with a confusing error message, it is pvlib. Because the PSM3 API has different endpoints for different data frequencies, pvlib.iotools.get_psm3
examines the interval
parameter and infers the appropriate URL, with the endpoint that serves 30/60 minute data as the fallback:
https://github.com/pvlib/pvlib-python/blob/v0.9.4/pvlib/iotools/psm3.py#L192-L197
Maybe that decision logic in pvlib.iotools.get_psm3
should be improved. In any case I don't think there is anything to change over here on the API side.
@PjEdwards
When specifying an incorrect interval during a request for PSM3 data, the following error message is returned: "The optional 'interval' parameter must be an integer in the set [30,60]"
Unlike what the error message states, the
interval
parameter can also be 5 or 15, thus I suggest changing the set to [5,15,30,60].An example of the error message generation is easily done using the pvlib library: