# Trouble with reading mseed file

**URL:** https://discourse.obspy.org/t/trouble-with-reading-mseed-file/1319
**Category:** Usage Questions
**Created:** [November 23, 2021, 4:10am UTC](https://discourse.obspy.org/t/trouble-with-reading-mseed-file/1319 "2021-11-23T04:10:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bruce24](https://discourse.obspy.org/user_avatar/discourse.obspy.org/bruce24/32/482_2.png) [@bruce24](https://discourse.obspy.org/u/bruce24)
#### Post date: [November 23, 2021, 4:10am UTC](https://discourse.obspy.org/t/trouble-with-reading-mseed-file/1319/1 "2021-11-23T04:10:44Z")

</div>

Hi, I am trying to convert some MATLAB codes to python where we use [`ReadMSEEDFast.m`](https://www.mathworks.com/matlabcentral/fileexchange/46532-readmseedfast) created by Martin Mityska to read mseed files, everything is okay. However, I use `obspy.read()` to read the same mseed file in jupyter-notebook like this,

```python
from obspy import read
tr = read("data.mseed")
print(tr)

```

it keeps throwing warnings,

```python
C:\ProgramData\Anaconda3\lib\site-packages\obspy\io\mseed\headers.py:828: InternalMSEEDWarning: readMSEEDBuffer(): Not a SEED record. Will skip bytes 512 to 639.
  warnings.warn(_w, InternalMSEEDWarning)
C:\ProgramData\Anaconda3\lib\site-packages\obspy\io\mseed\headers.py:828: InternalMSEEDWarning: readMSEEDBuffer(): Not a SEED record. Will skip bytes 640 to 767.
  warnings.warn(_w, InternalMSEEDWarning)
...
C:\ProgramData\Anaconda3\lib\site-packages\obspy\io\mseed\headers.py:828: InternalMSEEDWarning: readMSEEDBuffer(): Not a SEED record. Will skip bytes 17854592 to 17854719.
  warnings.warn(_w, InternalMSEEDWarning)

IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_data_rate_limit`.

Current values:
NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)
NotebookApp.rate_limit_window=3.0 (secs)

```

When I rerun the code, it just prints out two traces(first and last trace),

```python
2 Trace(s) in Stream:
GD.HMB.01.EHE | 2019-01-02T00:00:00.000000Z - 2019-01-02T00:00:00.670000Z | 200.0 Hz, 135 samples
GD.HMB.01.EHE | 2019-01-02T23:59:58.885000Z - 2019-01-02T23:59:59.995000Z | 200.0 Hz, 223 samples

```

Is mseed file invalid or how can I solve this problem?  
The mseed file is [here](https://file.io/Y0CQ1pFtqQJw).

---

<div class="post-metadata">

### Author: ![trichter](https://discourse.obspy.org/user_avatar/discourse.obspy.org/trichter/32/226_2.png) [@trichter](https://discourse.obspy.org/u/trichter)
#### Post date: [November 23, 2021, 9:29am UTC](https://discourse.obspy.org/t/trouble-with-reading-mseed-file/1319/2 "2021-11-23T09:29:18Z")

</div>

I tried to load the MSEED file directly in Python. The same problem, only two traces left. The errors you get are passed through from libmseed:

```python
obspy/io/mseed/headers.py:823: InternalMSEEDWarning: readMSEEDBuffer(): Not a SEED record. Will skip bytes 18487680 to 18487807.
  warnings.warn(_w, InternalMSEEDWarning)

```

I guess something is wrong with your MSEED file.
