-2

I get an error when I run my python script in windows task scheduler. My script is taking some date from an excel file. And the error is " No such file or directory". How I can fix it

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • Are you specifying a full path the the excel file? Also, it would be easier to help if you posted your script source. – Joe Block May 12 '21 at 15:07

1 Answers1

0

The answer is in the error " No such file or directory "

Triple check your locations in the python script by copy / pasting them and seeing if you can manually get there.

Will
  • 818
  • 3
  • 14
  • import time import yagmail import os path = os.path.dirname(os.path.realpath("C:/Users/Andrada/PycharmProjects/Checker/masini.xlsx")) def read_and_check(): df = pandas.read_excel(path) df.to_csv('masini.csv', index=None) list = [] with open('masini.csv') as f: reader = csv.DictReader(f) day = datetime.date.today() – Andrada Balog May 12 '21 at 16:06