Double check that all weights are positive. Zero and negative weights will cause this error.Also you might want to use a keyword with at most 8 letters. I think this is an official FITS requirement. PI may be able support more, so this might not be the problem.