Sorry, I jump to your second post too quickly.

Anyway the problem is with ccdproc, there is already an issue for that: github.com/astropy/astropy/issues/10977
A proposed solution is to add a default value for BUNIT, I not follow further to see if the proposed solution was merged.

Read More...