Running write_ms when casatools is imported results in a seg fault.

setup
casacore 3.5.0 nompi_py312hc5079fe_115 conda-forge
casatools 6.7.0.31
pyuvdata 3.2.4
This could probably be made into a minimal example by adding import casatools to the test for write_ms.