CreateWidget cannot be used on Player Controller with no attached player

An exception happens that I don’t understand. Can you identify what is wrong?