Writing format "SAC" is not supported

this is other people's code that I find from Github below and I mark the code that show error in my console window. I don't have any idea to solve this problem. Even if I try my best to understand the information in the Internet, I can't solve this problem seriously. By the way, I am freshman for Python and ObsPy.  Thank you to solve my problem seriously!!!!!!!!!

this is code below
_st, _tp, _ts, ps_res_npts = stream_from_h5(data_st)
for _sac in _st:
chn = _sac.stats.channel
out_sac_temp = os.path.join(outpath,
f’{evid}.{sta_info}.{chn}.sac.norm’)
_sac.write(out_sac_temp, format=‘SAC’)
#print(out_sac_temp)
read_idx = out_sac_temp.replace(‘Z.sac.norm’, ‘?.sac.norm’)
st = read(read_idx)

and this is the error in the console window

runfile(‘E:/WeiJie/Attention-Recurrent-Residual-U-Net-for-earthquake-detection-main/P01_make_stream_STEAD.py’, wdir=‘E:/WeiJie/Attention-Recurrent-Residual-U-Net-for-earthquake-detection-main’)
E:\WeiJie\Attention-Recurrent-Residual-U-Net-for-earthquake-detection-main\P01_make_stream_STEAD.py:49: DtypeWarning: Columns (22) have mixed types.Specify dtype option on import or set low_memory=False.
csv_data = STEAD_csv(data_csv)
INFO : 2022-07-07 11:44:29,366 : Processing: 1/126566: GDXB.NC_20111217201007_EV
Traceback (most recent call last):

File “E:\WeiJie\anaconda3\envs\tensorflow\lib\site-packages\obspy\core\stream.py”, line 1447, in write
format_ep = ENTRY_POINTS[‘waveform_write’][format]

KeyError: ‘SAC’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “E:\WeiJie\Attention-Recurrent-Residual-U-Net-for-earthquake-detection-main\P01_make_stream_STEAD.py”, line 71, in
_sac.write(out_sac_temp, format=‘SAC’) # 寫入out_sac_temp到_sac裡

File “E:\WeiJie\anaconda3\envs\tensorflow\lib\site-packages\obspy\core\trace.py”, line 999, in write
Stream([self]).write(filename, format, **kwargs)

File “E:\WeiJie\anaconda3\envs\tensorflow\lib\site-packages\obspy\core\stream.py”, line 1455, in write
', '.join(ENTRY_POINTS[‘waveform_write’])))

ValueError: Writing format “SAC” is not supported. Supported types:

This looks like a broken installation. You might want to try uninstalling and reinstalling again.

Thank you very much for answering my problem seriously