lsst::pex::exceptions::RuntimeError: 'WCS does not have an attached FITS approximation.'

I have run CalibrateImageTask on a single detector / visit combo from HSC. The task completes without error but when I attempt to display the image in firefly using

afwDisplay.setDefaultBackend('firefly')
afw_display = afwDisplay.Display(frame=1)
afw_display.mtv(calexp)
afw_display.setMaskTransparency(90)

I get the error lsst::pex::exceptions::RuntimeError: 'WCS does not have an attached FITS approximation.'

I’ve tried various things but have not been successful in getting calibrateImage to insert a SkyWcs that hasFitsApproximation as ‘True’ and thus can’t use the default approach to displaying the image.

Does afwDisplay only work on Exposure objects that have a wcs that can be approximated?

How do I see what an approximateWcs is not be written into the header?

Thanks for any guidance.

Which version of the software are you using?

This message is a bit odd because for HSC data we’ve not had a problem generating the SIP header from our accurate internal WCS.

@jbosch is it possible that the new code that first checks for the attached approximation is not falling back to asking AST for the approximation?

I see this as well for some exposures, but not others even from the same visit.
A workaround I use is to display just the masked image of the exposure:

afwDisplay.setDefaultBackend('firefly')
afw_display = afwDisplay.Display(frame=1)
afw_display.mtv(calexp.maskedImage)
afw_display.setMaskTransparency(90)