在RStudio中生成并重新加载会生成“保存文件”错误 [英] Build and reload in RStudio generates 'Save File' error

查看:439
本文介绍了在RStudio中生成并重新加载会生成“保存文件”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在作为RStudio(版本1.0.136,Ubuntu 16.04 64位)中的一个项目来开发启用Rcpp的R包,并且最近在通过工具>构建和重新加载来构建该包之后开始出现错误。错误对话框显示为:

I'm working on an Rcpp-enabled R package as a project in RStudio (version 1.0.136, Ubuntu 16.04 64 bit), and have recently started getting an error after building the package with Tools > Build and Reload. The error dialogue box reads:

Save File
No such file or directory 

在构建和重新加载后错误不会立即出现。相反,它是在稍后对文件进行编辑时发生的,似乎是随机的,而不一定是在尝试保存时发生的。但是,在关闭对话框后,如果没有其他错误就无法保存文件,这时出现以下消息:

The error doesn't appear straight after building and reloading. Rather, it occurs some time later while making edits to files, seemingly at random, and not necessarily while trying to save. However, after closing the dialogue box files cannot be saved without generating another error, this time with the message:

Error Saving File
No such file or directory 

唯一的解决方法是在不保存的情况下重新启动RStudio任何文件,从而丢失所有更改。

Following that, the only way forward is to restart RStudio without saving any files, thus losing all changes.

roxygen2或devtools似乎都不是问题,因为我尝试使用和不使用使用Roxygen生成文档进行构建和<工具>项目选项>构建工具中的使用devtools软件包功能选项。我也尝试过卸载和重新安装RStudio以及更新devtools等,但问题仍然存在。我想知道这是打包文件之一(例如NAMESPACE或DESCRIPTION)中的问题。软件包存储库位于 https://github.com/shaunpwilkinson/insect

It doesn't seem to be a problem with either roxygen2 or devtools since I've tried building with and without the Generate documentation with Roxygen and Use devtools package functions options in Tools > Project Options > Build Tools. I've also tried uninstalling andreinstalling RStudio as well as updating devtools etc, but the problem persists. I'm wondering if it's an issue in one of the package files such as NAMESPACE or DESCRIPTION. The package repository is available at https://github.com/shaunpwilkinson/insect.

推荐答案

我自己遇到了此错误,并且我根据Shaun的评论和RStudio支持的帖子发布了似乎有效的方法。网站。

I ran into this error myself, and I'm posting what seems to have worked based on the comment from Shaun and a post on the RStudio support website.

错误不仅限于构建软件包;我在沼泽标准RStudio项目中工作时遇到了它。

The error is not limited to building a package; I encountered it while working in a bog standard RStudio project.

我从RStudio支持中发现了此评论此处

I found this comment from RStudio support here:


I认为如果您清除〜/ .rstudio中的sdb(基于源数据)目录,那么现在可能会起作用。

I think that if you clear the sdb (source data based) directory inside ~/.rstudio, then this might get things working for now.

因此,我关闭了RStudio,进入终端并删除了整个子目录.RStudio.user(在项目目录中,这不是上面的注释直接建议的内容)。我重新启动了RStudio和voila。它可以正常工作,并且RStudio重新创建了.RStudio.user目录。

So I closed RStudio, went into the terminal and removed the entire subdirectory .RStudio.user (inside the project directory, which is not what the comment above suggested directly). I restarted RStudio and voila. It works, and RStudio recreated the .RStudio.user directory.

警告:此删除所有未保存的数据,包括环境的内容以及所有未保存的文件。使用此修补程序之前,应将未保存文件的内容复制到另一个文本编辑器。

WARNING: this will delete all the unsaved data including the contents of your environment and any unsaved files. You should copy the contents of unsaved files to another text editor before using this fix.

为了将来参考,我在OS / X 10.12.5上使用RStudio 1.0.143。

For future reference I am using RStudio 1.0.143 on OS/X 10.12.5.

这篇关于在RStudio中生成并重新加载会生成“保存文件”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆