Skip to content

install_github fails, files with accents #847

Open

Description

@tdhock

Hi @gaborcsardi I’m using remotes in my teaching, and I find it very useful in general! Thanks for your ongoing maintenance of this important package.

I wanted to demo installation of a package in a sub-directory of a github repository.
I expected the following should work, but I get an error

> remotes::install_github("tdhock/2026-01-aa-grande-echelle/demos/Rcpp-add-pkg@réf-issue")
Using GitHub PAT from the git credential store.
Downloading GitHub repo tdhock/2026-01-aa-grande-echelle@réf-issue
Error: Failed to install 'Rcpp.add' from GitHub:
  input string 61 is invalid
In addition: Warning message:
In gsub("[^/]", "", file_list) :
  unable to translate 'tdhock-2026-01-aa-grande-echelle-561a217/r+<ac>f+<ac>rences.org' to a wide string

In this github repo

  • there is a valid R package in the demos/Rcpp-add-pkg sub-directory
  • there are some valid files with accent marks in their names in other directories (not in the R package)

A work-around is to rename all of the files with accent marks in their names, but it definitely would be more convenient if install_github() could work in this case. Is that a change you would consider, please?
If not, I would suggest adding some documentation on ?install_github which mentions that this is not supported.
Thanks in advance!

Activity

  1. gaborcsardi commented on Mar 23, 2026

    @gaborcsardi
    Member

    This works for me, what's your OS, R version and default encoding?

  2. tdhock commented on Mar 23, 2026

    @tdhock
    Author

    this is on windows 11. I’m not sure what is the default encoding?

    > remotes::install_github("tdhock/2026-01-aa-grande-echelle/demos/Rcpp-add-pkg@réf-issue")
    Using GitHub PAT from the git credential store.
    Downloading GitHub repo tdhock/2026-01-aa-grande-echelle@réf-issue
    Error: Failed to install 'Rcpp.add' from GitHub:
      input string 61 is invalid
    In addition: Warning message:
    In gsub("[^/]", "", file_list) :
      unable to translate 'tdhock-2026-01-aa-grande-echelle-561a217/r+<ac>f+<ac>rences.org' to a wide string
    > traceback()
    7: stop(remote_install_error(remotes[[i]], e))
    6: value[[3L]](cond)
    5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    4: tryCatchList(expr, classes, parentenv, handlers)
    3: tryCatch(res[[i]] <- install_remote(remotes[[i]], ...), error = function(e) {
           stop(remote_install_error(remotes[[i]], e))
       })
    2: install_remotes(remotes, auth_token = auth_token, host = host, 
           dependencies = dependencies, upgrade = upgrade, force = force, 
           quiet = quiet, build = build, build_opts = build_opts, build_manual = build_manual, 
           build_vignettes = build_vignettes, repos = repos, type = type, 
           ...)
    1: remotes::install_github("tdhock/2026-01-aa-grande-echelle/demos/Rcpp-add-pkg@réf-issue")
    > sessionInfo()
    R version 4.5.2 (2025-10-31 ucrt)
    Platform: x86_64-w64-mingw32/x64
    Running under: Windows 11 x64 (build 26100)
    
    Matrix products: default
      LAPACK version 3.12.1
    
    locale:
    [1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
    [3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
    [5] LC_TIME=English_United States.utf8    
    
    time zone: America/Toronto
    tzcode source: internal
    
    attached base packages:
    [1] stats     graphics  utils     datasets  grDevices methods   base     
    
    loaded via a namespace (and not attached):
    [1] compiler_4.5.2 tools_4.5.2    curl_7.0.0     remotes_2.5.0 
    > Encoding("ê")
    [1] "UTF-8"
    > Encoding(" ")
    [1] "unknown"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions