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

Error: Function executeCommand not found in RStudio #1395

Closed
Moohan opened this issue Mar 15, 2021 · 6 comments
Closed

Error: Function executeCommand not found in RStudio #1395

Moohan opened this issue Mar 15, 2021 · 6 comments
Labels
tooling 🔨 Internal usethis tooling

Comments

@Moohan
Copy link

Moohan commented Mar 15, 2021

Getting the error: Error: Function executeCommand not found in RStudio when using some functions.

I used create_from_github() and got the error but it seemed to have still worked, however for pr_push I also get the error but this time it seems to be fatal.

I assume this is something to do with the RStudio version we're using (1.1.456). I don't know if the functions have worked on previous versions of usethis etc.

version
#>                _                           
#> platform       x86_64-w64-mingw32          
#> arch           x86_64                      
#> os             mingw32                     
#> system         x86_64, mingw32             
#> status                                     
#> major          3                           
#> minor          6.1                         
#> year           2019                        
#> month          07                          
#> day            05                          
#> svn rev        76782                       
#> language       R                           
#> version.string R version 3.6.1 (2019-07-05)
#> nickname       Action of the Toes
@jennybc
Copy link
Member

jennybc commented Mar 15, 2021

Yeah this likely does come from the use of such an old RStudio. It probably means I haven't guarded some RStudio API call properly, but even if I did, that would probably mean I'd just be throwing an error telling you the workflow isn't possible on your version of RStudio.

I realize it's odd to refer to this as "such an old version", but the official releases lag behind a lot of widespread use of preview versions (by years). Hence my perception of 1.1.x as quite old. Is upgrading RStudio something you might be able to do in the near future?

@Moohan
Copy link
Author

Moohan commented Mar 16, 2021

I think a specific message about RStudio would be much nicer (I could also take this to our IT dept :p)

Upgrading is definitely on the cards but seems to be a very slow process of IT approval, testing and then roll out... Apparently, 1.4 pro is in testing on our server right now so maybe I'm being pessimistic but I've also heard that 1.2 and then 1.3 were in testing in the past and we never got to use them in practice.

@jennybc
Copy link
Member

jennybc commented Mar 16, 2021

Can you show me the exact message that you are seeing?

@jennybc
Copy link
Member

jennybc commented Mar 16, 2021

FWIW I did ask a bit about different versions and their usage and support status. In terms of pro products, here are the supported versions:

https://rstudio.com/support/

So, yes, it would seem to be very sensible for your organization to move. The oldest supported version is 1.3.1093.

@Moohan
Copy link
Author

Moohan commented Mar 17, 2021

Running create_from_github()

Restarting R session...

Warning messages:
1: packagedevtoolswas built under R version 3.6.3 
2: packageusethiswas built under R version 3.6.3 
> create_from_github("Public-Health-Scotland/learnr-intro")
i Defaulting to 'https' Git protocolSetting `fork = TRUE`Creating 'C:/Users/jamesm32/Desktop/learnr-intro/'Forking 'Public-Health-Scotland/learnr-intro'Cloning repo from 'https://github.com/Moohan/learnr-intro.git' into 'C:/Users/<user>/Desktop/learnr-intro'Setting active project to 'C:/Users/jamesm32/Desktop/learnr-intro'
i Default branch is 'master'Adding 'upstream' remote: 'https://github.com/Public-Health-Scotland/learnr-intro.git'
Error: Function executeCommand not found in RStudioSetting active project to '<no active project>'

After manually switching to the new 'learnr-intro' project (doesn't automatically switch) and running pr_push() - Note I didn't make/commit any changes this time, although I did when I originally posted the issue, I seem to get the same error though:

> pr_push()
√ Setting active project to 'C:/Users/jamesm32/Desktop/learnr-intro'
Error: Function executeCommand not found in RStudio

@jennybc jennybc added the tooling 🔨 Internal usethis tooling label Sep 28, 2021
@jennybc
Copy link
Member

jennybc commented May 25, 2022

I regard this as a self-resolving matter, as the relevant versions of RStudio fall deeper and deeper into the past.

@jennybc jennybc closed this as completed May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling 🔨 Internal usethis tooling
Projects
None yet
Development

No branches or pull requests

2 participants