This usually happens when a certificate has not been set up for a course.  You will need to be sure a certificate has been created and linked to that particular course.