Error in using massdownloader

Hi there! When I use massdownloader to download data, I got the following error. It seems that some file is corrupted, but I don’t know which file it is, and I am not sure whether it is my local downloaded file or the file on the remote data center that is corrupted.

Any suggestions will be highly appreciated.

site-packages/obspy/io/mseed/util.py:562: UserWarning: Failed to decode network code as ASCII. Code in file: '��' (� indicates characters that could not be decoded). Will be interpreted as: ''. This is an invalid MiniSEED file - please contact your data provider.                                                                                                                                            
  warnings.warn(msg.format(                                                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                                                                                      
  File "/lib/python3.10/site-packages/obspy/io/mseed/util.py", line 702, in _get_record_information                                                                                        
    starttime = _parse_time(values)                                                                                                                                                                                                     
  File "/lib/python3.10/site-packages/obspy/io/mseed/util.py", line 675, in _parse_time                                                                                                    
    raise InternalMSEEDParseTimeError(msg)                                                                                                                                                                                              
obspy.io.mseed.InternalMSEEDParseTimeError: julday out of bounds (wrong endian?): 29056                                                                                                                                                 
                                                                                                                                                                                                                                        
During handling of the above exception, another exception occurred:                                                                                                                                                                     
                                                                                                                                                                                                                                        
Traceback (most recent call last):                                                                                                                                                                                                      
  File "download.py", line 65, in <module>                                                                                                                   
    mdl.download(                                                                                                                                                                                                                       
  File "lib/python3.10/site-packages/obspy/clients/fdsn/mass_downloader/mass_downloader.py", line 218, in download                                                                        
    helper.sanitize_downloads()                                                                                                                                                                                                         
  File "lib/python3.10/site-packages/obspy/clients/fdsn/mass_downloader/download_helpers.py", line 918, in sanitize_downloads                                                             
    station.sanitize_downloads(logger=self.logger)                                                                                                                                                                                      
  File "python3.10/site-packages/obspy/clients/fdsn/mass_downloader/download_helpers.py", line 379, in sanitize_downloads                                                             
    get_start_and_end_time(time_interval.filename)                                                                                                                                                                                      
  File "lib/python3.10/site-packages/obspy/io/mseed/util.py", line 89, in get_start_and_end_time                                                                                          
    info = get_record_information(                                                                                                                                                                                                      
  File "lib/python3.10/site-packages/obspy/io/mseed/util.py", line 540, in get_record_information                                                                                         
    info = _get_record_information(f, offset=offset, endian=endian)                                                                                                                                                                     
  File "lib/python3.10/site-packages/obspy/io/mseed/util.py", line 706, in _get_record_information                                                                                        
    starttime = _parse_time(values)                                                                                                                                                                                                     
  File "lib/python3.10/site-packages/obspy/io/mseed/util.py", line 675, in _parse_time                                                                                                    
    raise InternalMSEEDParseTimeError(msg)                                                                                                                                                                                              
obspy.io.mseed.InternalMSEEDParseTimeError: julday out of bounds (wrong endian?): 32881 

You could try to use MassDownloader(..., debug=True) and see if that brings some useful information.

Thank you for the suggestion. I have tried adding debug=True, but it doesn’t result in more information.

This error seems to occur at the end of downloading, after finished downloading stations. The errors are preceded by warnings of

obspy.clients.fdsn.mass_downloader - WARNING: Station information could not be downloaded for AV.BGL..EHZ. MiniSEED files outside of the station information period will be deleted! 

but I don’t know whether these warnings are related to the error.

Well hard to say. In any case, impossible to tell without the code (how Massdownloader is used) and the full output.

I was downloading data in a long time range. If I change the starttime and endtime, the massdownloader may work. I am trying to figure out what time range would cause this error.