question about read() vs readSEGY()

Hello, I have the following python script:

from obspy import read, Trace, Stream, UTCDateTime
from obspy.segy.core import readSEGY
fin=read("/Users/goldman/zi.segy", format="SEGY")

However, the last line from above gives the error:

Traceback (most recent call last):
  File "", line 7, in <module>
AttributeError: 'Stream' object has no attribute ‘stats'

My question is, how does one associate SEGY trace headers with a stream when using read() instead of readSEGY()?

Please note that on the web page titled:

obspy.segy - SEG Y and SU read and write support for ObsPy

the web page gives an example using segy.core.readSEGY(), while the segy.core.readSEGY() documentation says not to call readSEGY() directly

Thanks for your help

Mark Goldman
U.S. Geological Survey
345 Middlefield Rd, MS 977
Menlo Park, CA 94025


The stream object does not have stats. Use print(fin[0].stats) or similar for each trace within the stream.