Skip to content

Improve NDSWarning message emitted by TimeSeriesDict.fetch

This PR improves the NDSWarning message emitted during TimeSeriesDict.fetch when errors in the fetch are caught so that a different NDS server can be tried.

The old warning was something like this:

/home/duncan/git/gwpy/gwpy/timeseries/core.py:1142: NDSWarning: no data received from nds.ligo.caltech.edu for [1126260017 ... 1126260617)
  warnings.warn(error.split('\n', 1)[0],

The new one includes the channels requested and the GPS interval (which isn't always in the error message emitted by the NDS2 client):

/home/duncan/git/gwpy/gwpy/timeseries/core.py:1143: NDSWarning: failed to fetch data for H1:GDS-CALIB_STRAIN, H1:PEM-CS_ACC_PSL_PERISCOPE_X_DQ in interval [1126260017, 1126260617.0): no data received from nds.ligo.caltech.edu for [1126260017 ... 1126260617)
  warnings.warn(

Merge request reports