Might you be thinking of
Making Mr Right?
A reclusive scientist builds a robot which looks exactly like Dr. Ulysses, a scientist set to go on a long-term space mission. Since the (real) scientist seems to lack all emotions, he is unable to program his (lack of) emotion into his automaton, and...