question

AyushAtale-4287 avatar image
0 Votes"
AyushAtale-4287 asked JennyYan-MSFT commented

Windows Task Scheduler showing me Error: No such file in directory while running an python exe file.

Windows Task Scheduler showing me Error: No such file in directory while running an python exe file.
I have created a python exe file using pyinstaller when I create a task for this exe file, the exe file checks a excel(.xlsx) file in directory and write it in that file. So it runs when I do it manually, but when I do it by scheduling the task, it does not work.
PLease reply early.

windows-10-generaloffice-excel-itpro
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just for test, use the same schedule task and set it to run a different .exe files.
Does it required administrator mode?

0 Votes 0 ·

1 Answer

JennyYan-MSFT avatar image
0 Votes"
JennyYan-MSFT answered JennyYan-MSFT commented

Hi,
1.Is the file path containing a mapped network drive?

If so, please try to replace by "\\server\\share\\folder\\filename.ext" instead of the mapped drive.

2.Here is a similar case when running scripts via windows task scheduler and the resolution shared is to add "cd customized drive" into the script since Task scheduler loads the C:\Windows by default as a directory.

Details could be referred to:
https://stackoverflow.com/questions/44525840/windows-task-scheduler-failed-to-open-stream-no-such-file-or-directory

Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.



Hope this helps and please help to accept as Answer if the response is useful.

Thanks,
Jenny

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

May i know if there is any update for your question?

Hope the information provided is helpful and please feel free to let us know more assistance needed.



If the Answer is helpful, please click Accept Answer and upvote it. Thanks.

Thanks,
Jenny

0 Votes 0 ·