Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External2 C_savehistory error in reticulate::repl_python() for RStudio latest version (v.1.2.1335) #572

Closed
gundalav opened this issue Aug 7, 2019 · 7 comments

Comments

@gundalav
Copy link

gundalav commented Aug 7, 2019

I was trying to run Python Script from within RStudio latest version (v.1.2.1335).

I am following this instruction.

I begin by typing:

 > reticulate::repl_python()

But I get this error:

Error in .External2(C_savehistory, file) : No such file or directory

How can I solve this?

@kevinushey
Copy link
Collaborator

What happens when you try to invoke utils::savehistory() directly? What is the output of getwd()?

@gundalav
Copy link
Author

gundalav commented Aug 8, 2019

I get this message and error:

> utils::savehistory()
Error in .External2(C_savehistory, file) : No such file or directory
> getwd()
[1] "/home/ubuntu/storage1/my_analysis"

@kevinushey
Copy link
Collaborator

Then I don't have a good idea as to what's going on -- evidently R is not letting you write to the .Rhistory file in /home/ubuntu/storage1/my_analysis, but I do not know why.

@gundalav
Copy link
Author

gundalav commented Aug 9, 2019

Then I don't have a good idea as to what's going on -- evidently R is not letting you write to the .Rhistory file in /home/ubuntu/storage1/my_analysis, but I do not know why.

I remove the .Rhistory file, now it's working. Thanks.

@matiasandina
Copy link

I found this happen when not having access to root directory. Using setwd(...) into a directory with write permission solved the issue

@skeydan skeydan closed this as completed Jan 24, 2020
@bpbraun
Copy link

bpbraun commented Sep 5, 2023

My issue was that I didn't have read/write permissions for that directory. Once I changed my permissions, I was good to go.

@kirangauthier
Copy link

Thank you for this, agreed, using setwd('/path_to_wd/) resolved the issue in RStudio for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants