为什么Task Scheduler无法运行我的Python脚本

我正在尝试使用任务计划程序运行python脚本,我已经编写了一个批处理文件

"C:\Program Files\WinPython64\python-3.7.7.amd64\python.exe" "C:\Users\USER\Documents\Python_Code\python3.6\Web_Scraping\Firmware_Upgrade\Set_Check_Upgrade_v7.py"

其中的一个简单的Hello World类型示例。

当我尝试运行实际代码时,我收到以下错误消息;

C:\Windows\system32>"C:\Program Files\WinPython64\python-3.7.7.amd64\python.exe" "C:\Users\USER\Documents\Python_Code\python3.6\Web_Scraping\Firmware_Upgrade\Set_Check_Upgrade_v7.py"

DevTools listening on ws://127.0.0.1:53073/devtools/browser/18cef93b-eaa4-4e14-9439-6f0b66b60727
Traceback (most recent call last):
  File "C:\Users\USER\Documents\Python_Code\python3.6\Web_Scraping\Firmware_Upgrade\Set_Check_Upgrade_v7.py",line 22,in <module>
    firmware_data = pd.read_excel(total_string)
  File "C:\Program Files\WinPython64\python-3.7.7.amd64\Lib\site-packages\pandas\io\excel\_base.py",line 304,in read_excel
    io = ExcelFile(io,engine=engine)
  File "C:\Program Files\WinPython64\python-3.7.7.amd64\Lib\site-packages\pandas\io\excel\_base.py",line 824,in __init__
    self._reader = self._engines[engine](self._io)
  File "C:\Program Files\WinPython64\python-3.7.7.amd64\Lib\site-packages\pandas\io\excel\_xlrd.py",line 21,in __init__
    super().__init__(filepath_or_buffer)
  File "C:\Program Files\WinPython64\python-3.7.7.amd64\Lib\site-packages\pandas\io\excel\_base.py",line 353,in __init__
    self.book = self.load_workbook(filepath_or_buffer)
  File "C:\Program Files\WinPython64\python-3.7.7.amd64\Lib\site-packages\pandas\io\excel\_xlrd.py",line 36,in load_workbook
    return open_workbook(filepath_or_buffer)
  File "C:\Program Files\WinPython64\python-3.7.7.amd64\Lib\site-packages\xlrd\__init__.py",line 111,in open_workbook
    with open(filename,"rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'Upgrade_v5.22_01-08-2020.xlsx'

我使用的python代码

file_string = 'Upgrade_v5.22_01-08-2020'
total_string = file_string + '.xlsx'

firmware_data = pd.read_excel(total_string)

在Pycharms IDE中运行但不使用Windows 10 Task Scheduler App时可以使用。

Excel文件与Python文件位于同一目录中。

我尝试创建启用了“以最高特权运行”的任务,但这没什么区别。

相关文章

功能概要:(目前已实现功能)公共展示部分:1.网站首页展示...
大体上把Python中的数据类型分为如下几类: Number(数字) ...
开发之前第一步,就是构造整个的项目结构。这就好比作一幅画...
源码编译方式安装Apache首先下载Apache源码压缩包,地址为ht...
前面说完了此项目的创建及数据模型设计的过程。如果未看过,...
python中常用的写爬虫的库有urllib2、requests,对于大多数比...