conflicted icon indicating copy to clipboard operation
conflicted copied to clipboard

'verbose' is not an exported object from 'namespace:R.utils'

Open manomuthus opened this issue 2 years ago • 1 comments

I have been using conflicted for a while now without any issues. Recently I have been facing this issue where I get the following error message Error: 'verbose' is not an exported object from 'namespace:R.utils' This happens when I load the package mostly and sometimes when I use conflicts_prefer

manomuthus avatar Nov 07 '23 15:11 manomuthus

I have this same problem, but can see that it only happens when loading all three of httr, R.utils and conflicted. Any combination of just two of them loads fine

here's the session that doesn't work

Restarting R session...

> library(R.utils)
Loading required package: R.oo
Loading required package: R.methodsS3
R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
R.oo v1.25.0 (2022-06-12 02:20:02 UTC) successfully loaded. See ?R.oo for help.

Attaching package: ‘R.oo’

The following object is masked from ‘package:R.methodsS3’:

    throw

The following objects are masked from ‘package:methods’:

    getClasses, getMethods

The following objects are masked from ‘package:base’:

    attach, detach, load, save

R.utils v2.12.3 (2023-11-18 01:00:02 UTC) successfully loaded. See ?R.utils for help.

Attaching package: ‘R.utils’

The following object is masked from ‘package:utils’:

    timestamp

The following objects are masked from ‘package:base’:

    cat, commandArgs, getOption, isOpen, nullfile, parse, warnings

> library(conflicted)
Warning message:
package ‘conflicted’ was built under R version 4.3.2 
> library(httr)
Error: 'verbose' is not an exported object from 'namespace:R.utils'

Problem persisted even when I upgraded R and all packages. The work around is to not load R.utils, but just us :: for any functions from it I need eg R.utils::gunzip(...). I am guessing this is really an R.utils problem, although it is something about the combination of R.utils, conflicted, and httr that does it.

ellisp avatar Dec 13 '23 06:12 ellisp

Rerpex:

library(conflicted)

library(R.utils)
#> Loading required package: R.oo
#> Loading required package: R.methodsS3
#> R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
#> R.oo v1.26.0 (2024-01-24 05:12:50 UTC) successfully loaded. See ?R.oo for help.
#> 
#> Attaching package: 'R.oo'
#> The following object is masked from 'package:R.methodsS3':
#> 
#>     throw
#> The following objects are masked from 'package:methods':
#> 
#>     getClasses, getMethods
#> The following objects are masked from 'package:base':
#> 
#>     attach, detach, load, save
#> R.utils v2.12.3 (2023-11-18 01:00:02 UTC) successfully loaded. See ?R.utils for help.
library(httr)
#> Error: 'verbose' is not an exported object from 'namespace:R.utils'

Created on 2024-10-21 with reprex v2.1.0

And traceback:

    ▆
 1. └─conflicted (local) library(httr)
 2.   └─conflicted:::conflicts_register()
 3.     └─conflicted::conflict_scout(pkgs)
 4.       └─base::Map(unique_obj, names(potential), potential)
 5.         └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
 6.           └─conflicted (local) `<fn>`(dots[[1L]][[19L]], dots[[2L]][[19L]])
 7.             └─base::lapply(pkgs, getExportedValue, name)
 8.               └─base (local) FUN(X[[i]], ...)

hadley avatar Oct 21 '24 13:10 hadley

Looks like this is an R.utils buglet:

library(R.utils)
#> Loading required package: R.oo
#> Loading required package: R.methodsS3
#> R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
#> R.oo v1.26.0 (2024-01-24 05:12:50 UTC) successfully loaded. See ?R.oo for help.
#> 
#> Attaching package: 'R.oo'
#> The following object is masked from 'package:R.methodsS3':
#> 
#>     throw
#> The following objects are masked from 'package:methods':
#> 
#>     getClasses, getMethods
#> The following objects are masked from 'package:base':
#> 
#>     attach, detach, load, save
#> R.utils v2.12.3 (2023-11-18 01:00:02 UTC) successfully loaded. See ?R.utils for help.
#> 
#> Attaching package: 'R.utils'
#> The following object is masked from 'package:utils':
#> 
#>     timestamp
#> The following objects are masked from 'package:base':
#> 
#>     cat, commandArgs, getOption, isOpen, nullfile, parse, use, warnings

"verbose" %in% ls("package:R.utils")
#> [1] TRUE
R.utils::verbose
#> Error: 'verbose' is not an exported object from 'namespace:R.utils'

Created on 2024-10-22 with reprex v2.1.0

I've never seen this problem before.

hadley avatar Oct 22 '24 22:10 hadley