# You either need to duplicate all backslashes: "C:UsersEricDesktopeeline.txt" # Or prefix the string with r (to produce a raw string): r"C:UsersEricDesktopeeline.txt"