When typing in Console (in RStudio) repeatly get error 'attr' error msg.

Error in base::attr(..., exact = TRUE) : 
  formal argument "exact" matched by multiple actual arguments

.... tched by multiple actual arguments

traceback()

5: attr(results, "meta", exact = TRUE)
4: .rs.makeCompletions(token = token, results = results, packages = packages, 
       quote = FALSE, type = type, overrideInsertParens = overrideInsertParens)
3: .rs.getCompletionsSearchPath(token)
2: Reduce(.rs.appendCompletions, list(.rs.getCompletionsSearchPath(token), 
       .rs.getCompletionsNAMESPACE(token, documentId), .rs.getCompletionsPackages(token, 
           TRUE), .rs.getCompletionsActiveFrame(token, envir), .rs.getCompletionsLibraryContext(token, 
           string, context, numCommas, functionCall, documentId, 
           envir)))
1: .rs.rpc.get_completions("traceback", list(), "", NULL, "", list(), 
       list(), FALSE, "", "", "traceback", TRUE)
> ```

Could you also share the code you ran that resulted in the error?

No code. I am in Rstudio and typing into console, with screeen just cleared (Cntrl-L).

> 

I start typing, first 2 letters (of library), all good.

> li

as I soon as add b, screen has this.

Error in base::attr(..., exact = TRUE) : 
  formal argument "exact" matched by multiple actual arguments
>lib

if I now add r, message appears twice.

Error in base::attr(..., exact = TRUE) : 
  formal argument "exact" matched by multiple actual arguments
Error in base::attr(..., exact = TRUE) : 
  formal argument "exact" matched by multiple actual arguments
> 
>libr

And eventually looks something like this:

... 
  formal argument "exact" matched by multiple actual arguments
Error in base::attr(..., exact = TRUE) : 
  formal argument "exact" matched by multiple actual arguments
UE) : 
  formal argument "exact" matched by multiple actual arguments
Error in base::attr(..., exact = TRUE) : 
  formal argument "exact" matched by multiple actual arguments
...
> 
> 
>library

What steps have you taken so far to try to get it back to normal?

I'm not at all sure this will help, but you might try resetting R's desktop state: https://support.posit.co/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State.

If that does not help, you might go to Tools > Global Options > Code > Completion and change "Show Code Completions" to "Never". If that gets rid of the problem, we can explore completion settings and try to figure things out from there.

2 Likes
Problem disappears!
"Show Code Completions" to "Never"

But no luck when I moved files/folders described in resetting R's desktop state Same problem.

Will change completion settings; see if any affect.

Many thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.