In the hopes I was wondering if there is any possibility how to bypass this error.
In essence, I’ve got a catalog of ~90 events and I want to get the waveforms from each of it from a seismic station of the IVNG in Italy. I want to loop the get.waveforms to get al stream list in the end, but after random amounds of streams, I get a error messange that connection was bad or server did not respond. I also tried to raise the timeout time of the client, but it did not help, I guess it’s the time limit of the INGV server then.
The code I use:
st =  d = 0 while d < len(cat): st.append(c.get_waveforms("IV", "PRMA", "*", "HH*", t[d] - 60, t[d] + 90*60)) d = d + 1
The error line after random amound of downloaded waveforms:
obspy.clients.fdsn.header.FDSNException: Unknown Error (URLError): <urlopen error [WinError 10060] Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
I updated obspy in Pycharm and using the latest version.
Is there a possibility to maybe write the streams st whenever the connection gets lost, and then continuing at that event of the catalog where connection was lost, dynamically? E.g., first attempt I got the first 10 event streams until the error → write to st1. Then start again but after the first 10 events → write the next few until the error…and so on…
Sorry for bothering you, I’m not very good in Python yet and thanks for any input.