Why does course_or_parent_loc being a string mean that it can't be used?