1

我正在使用 RSelenium 包使用 Firefox 浏览网页。当我开始构建我的脚本时,我使用 makeFirefoxProfile 函数创建临时配置文件以设置下载目录和相关文件类型,以将所需文件下载到特定目录。

当我试图这样做时,我收到了关于 zip 文件的错误。经过一番研究,我安装了 rtools 并成功解决了这个错误。我的脚本按预期工作。

现在我想在 Windows 机器上定期进行该操作。为此,当我尝试使用 taskscheduleR 包为 Windows 任务计划程序创建任务时,由于 Windows 没有内置命令行 zip 工具,我收到了一些 zip 错误

在我尝试操作任务后,您可以查看下面的错误代码

Error in file(tmpfile, "rb") : cannot open the connection
Calls: makeFirefoxProfile -> file
In addition: Warning messages:
1: In system2(zip, args, input = input, invisible = TRUE) :
  '"zip"' not found
2: In file(tmpfile, "rb") :
  cannot open file 'C:\Users\user\AppData\Local\Temp\RtmpKCFo30\file1ee834ae3394.zip': No such file or directory
Execution halted

当我运行我的脚本时,在 R-Studio 中没有问题。谢谢您的帮助

4

0 回答 0