# Error in using massdownloader

**URL:** https://discourse.obspy.org/t/error-in-using-massdownloader/2165
**Category:** Uncategorized
**Created:** [March 5, 2025, 4:11am UTC](https://discourse.obspy.org/t/error-in-using-massdownloader/2165 "2025-03-05T04:11:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zhong-yy](https://discourse.obspy.org/user_avatar/discourse.obspy.org/zhong-yy/32/559_2.png) [@zhong-yy](https://discourse.obspy.org/u/zhong-yy)
#### Post date: [March 5, 2025, 4:11am UTC](https://discourse.obspy.org/t/error-in-using-massdownloader/2165/1 "2025-03-05T04:11:32Z")

</div>

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.

```python
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 

```

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [March 5, 2025, 1:38pm UTC](https://discourse.obspy.org/t/error-in-using-massdownloader/2165/2 "2025-03-05T13:38:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zhong-yy](https://discourse.obspy.org/user_avatar/discourse.obspy.org/zhong-yy/32/559_2.png) [@zhong-yy](https://discourse.obspy.org/u/zhong-yy)
#### Post date: [March 6, 2025, 3:11am UTC](https://discourse.obspy.org/t/error-in-using-massdownloader/2165/3 "2025-03-06T03:11:25Z")

</div>

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

```python
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.

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [March 6, 2025, 8:09am UTC](https://discourse.obspy.org/t/error-in-using-massdownloader/2165/4 "2025-03-06T08:09:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zhong-yy](https://discourse.obspy.org/user_avatar/discourse.obspy.org/zhong-yy/32/559_2.png) [@zhong-yy](https://discourse.obspy.org/u/zhong-yy)
#### Post date: [March 6, 2025, 3:15pm UTC](https://discourse.obspy.org/t/error-in-using-massdownloader/2165/5 "2025-03-06T15:15:27Z")

</div>

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.
