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

Confusing error: rlang_cli_format_fallback #1364

Closed
JohnCoene opened this issue Feb 11, 2022 · 1 comment
Closed

Confusing error: rlang_cli_format_fallback #1364

JohnCoene opened this issue Feb 11, 2022 · 1 comment

Comments

@JohnCoene
Copy link

JohnCoene commented Feb 11, 2022

The following (typo in column name) leads to a confusing error message.

cars |> 
  dplyr::mutate(
    new = purrr::map2(
      .data$speed,
      .data$dit, # wrong column name
      function(x, y) {
        x + y
      }
    )
  )
Error in `.rlang_cli_format_fallback()`:
! Bullet names must be one of "i", "x", "v", "*", "!", ">", or " ".
Run `rlang::last_error()` to see where the error occurred.
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 20.3

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=de_CH.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_CH.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_CH.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] fansi_0.5.0      utf8_1.2.2       crayon_1.4.2     dplyr_1.0.7      R6_2.5.1        
 [6] lifecycle_1.0.1  magrittr_2.0.2   pillar_1.6.4     rlang_1.0.1      cli_3.1.0       
[11] renv_0.15.2      vctrs_0.3.8      generics_0.1.1   ellipsis_0.3.2   tools_4.1.2     
[16] glue_1.5.1       purrr_0.3.4      compiler_4.1.2   pkgconfig_2.0.3  tidyselect_1.1.1
[21] tibble_3.1.6
@lionel-
Copy link
Member

lionel- commented Feb 14, 2022

Thanks, I've reported the issue downstream: tidyverse/dplyr#6186

On the rlang side, we should improve this internal error and evaluate the error callback in the ns env rather than base to get cli formatting instead of the fallback.

lionel- added a commit that referenced this issue Feb 23, 2022
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

2 participants