Conversion from SAC file to SEG-Y file

Hi, I am trying to convert SAC files to SEGY files with the appropriate headers, I have already built my own headers with the segyheaderobject that Obspy has, but when I make the conversion, the headers just disappear, and the file lost all the important things of the headers.

Does anybody know how to fix that?