【问题标题】:local shiny app crashes after temporary directory gets deleted临时目录被删除后本地闪亮的应用程序崩溃
【发布时间】:2019-01-26 21:17:47
【问题描述】:

我正在我的 Windows 机器上本地运行一个闪亮的应用程序,它每天使用批处理文件自动运行。我最近遇到一个问题,R tmp 目录 /tmp/RtmpXXXXX 被删除,应用程序失败:

Warning in file(open = "w+b", encoding = "UTF-8") :
  cannot open file 
'C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT\Rf140c40ab30be': No such file 
or directory  # deleted file
Warning in normalizePath(path.expand(path), winslash, mustWork) :
  path[1]="C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT": The system cannot 
find the file specified  # deleted folder
Warning in file(open = "w+") :
  cannot open file 
'C:\Users\Carlos\AppData\Local\Temp\Rtmp0maCtT\Rf140c38044f8': No such file 
or directory
Warning: Error in file: cannot open the connection  # program crashes
Stack trace (innermost first):
    1: runApp
Error : cannot open the connection

我应该如何管理一段时间后自动删除的临时目录?我尝试了changing 文件路径以查看是否可以解决问题,但这没有用。

【问题讨论】:

    标签: r windows shiny taskscheduler


    【解决方案1】:

    我运行procmon 并注意到Windows Disk Cleanup 几乎每天都在自动删除临时文件,影响会话的临时目录并导致闪亮的应用程序崩溃。

    要禁用此自动计划任务:

    • 打开任务计划程序
    • 向下钻取到 任务计划程序库 > Microsoft > Windows
    • 点击DiskCleanup
    • 在右侧窗格中单击禁用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-08
      • 2018-05-27
      • 2023-04-11
      • 1970-01-01
      • 2012-06-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多