This happens because the chan parameter passed to _attachResponse is a list of channels. The obspy FDSN get_stations function, however, requires a string that may use wildcards. A quick solution is to loop over the channels and add the inventories to an empty inventory like so:
def _attachResponse(fet, st, start, end, net, sta, loc, chan):
"""
Function to attach response from inventory or client
"""
if not fet.removeResponse or fet.inventory is None:
return st
if isinstance(fet.inventory, obspy.station.inventory.Inventory):
st.attach_response(fet.inventory)
else:
inv = obspy.station.Inventory([], 'detex')
for cha in chan:
inv += fet.inventory.get_stations(starttime=start,
endtime=end,
network=net,
station=sta,
loc=loc,
channel=cha,
level="response")
st.attach_response(inv)
return st
This happens because the chan parameter passed to _attachResponse is a list of channels. The obspy FDSN get_stations function, however, requires a string that may use wildcards. A quick solution is to loop over the channels and add the inventories to an empty inventory like so: