Braun, Stefan
2017-Aug-23 10:02 UTC
[R-sig-Fedora] Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
Dear list, I installed R 3.3.2 on a Red Hat Linux Enterprise 7.3 machine by adding the EPEL-repository and then installing it via yum. R starts up and seems to be doing fine at first sight. However, when I try to list the files in a directory with the command files <- list.files(path="/home/username/directory_name/", pattern="*.Rda",, full.names=T, recursive=FALSE) I get the error translateCharUTF8' must be called on a CHARSXP Execution halted On my local windows machine the command works fine. Googling this nothing really comes up except that the installation might be broken. (See http://r.789695.n4.nabble.com/list-files-error-message-translateCharUTF8-must-be-called-on-a-CHARSXP-td3250302.html) The strange thing is, that if I copy and paste the command into R and execute it, it does not work, but if I copy and paste it into R and change that command in a way that should not change its result but only add spaces or something like that it might run. E.g. changing it to files <- list.files(path = "/home/username/directory_name/", pattern = "*.Rda",, full.names = T, recursive = FALSE) might work, might not work and return the same error, or might execute but when I then type "files" that might return [1]Error: 'getCharCE' must be called on a CHARSXP The sessionInfo commmand gives me: sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux Server 7.3 (Maipo) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base uname -mrs gives me: Linux 3.10.0-514.el7.x86_64 x86_64 Any help would be greatly appreciated. Best regards, Stefan Braun [[alternative HTML version deleted]]
Johannes Lips
2017-Aug-23 11:12 UTC
[R-sig-Fedora] Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
On 23.08.2017 12:02, Braun, Stefan wrote:> Dear list, > > I installed R 3.3.2 on a Red Hat Linux Enterprise 7.3 machine by adding the EPEL-repository and then installing it via yum. > R starts up and seems to be doing fine at first sight. However, when I try to list the files in a directory with the command > > files <- list.files(path="/home/username/directory_name/", pattern="*.Rda",, full.names=T, recursive=FALSE) > > I get the error > > translateCharUTF8' must be called on a CHARSXP > Execution halted > > On my local windows machine the command works fine. > Googling this nothing really comes up except that the installation might be broken. (See http://r.789695.n4.nabble.com/list-files-error-message-translateCharUTF8-must-be-called-on-a-CHARSXP-td3250302.html) > > The strange thing is, that if I copy and paste the command into R and execute it, it does not work, but if I copy and paste it into R and change that command in a way that should not change its result but only add spaces or something like that it might run. E.g. changing it to > > files <- list.files(path = "/home/username/directory_name/", pattern = "*.Rda",, full.names = T, recursive = FALSE) > > might work, might not work and return the same error, or might execute but when I then type "files" that might return > > [1]Error: 'getCharCE' must be called on a CHARSXP > > The sessionInfo commmand gives me: > sessionInfo() > R version 3.3.2 (2016-10-31) > Platform: x86_64-redhat-linux-gnu (64-bit) > Running under: Red Hat Enterprise Linux Server 7.3 (Maipo) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > uname -mrs gives me: > Linux 3.10.0-514.el7.x86_64 x86_64 > > Any help would be greatly appreciated. > > Best regards, > Stefan BraunJust for the record, there's the stackoverflow question https://stackoverflow.com/questions/45835818/translatecharutf8-must-be-called-on-a-charsxp-execution-halted Cheers Johannes> > [[alternative HTML version deleted]] > > _______________________________________________ > R-SIG-Fedora mailing list > R-SIG-Fedora at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-fedora
Martyn Plummer
2017-Aug-23 12:27 UTC
[R-sig-Fedora] Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
It is difficult to debug this without a reproducible example. Do you have, in the file system that you are trying to list, files with names that are not utf8-encoded? Martyn On Wed, 2017-08-23 at 13:12 +0200, Johannes Lips wrote:> On 23.08.2017 12:02, Braun, Stefan wrote: > > Dear list, > > > > I installed R 3.3.2 on a Red Hat Linux Enterprise 7.3 machine by > > adding the EPEL-repository and then installing it via yum. > > R starts up and seems to be doing fine at first sight. However, > > when I try to list the files in a directory with the command > > > > files <- list.files(path="/home/username/directory_name/", > > pattern="*.Rda",, full.names=T, recursive=FALSE) > > > > I get the error > > > > translateCharUTF8' must be called on a CHARSXP > > Execution halted > > > > On my local windows machine the command works fine. > > Googling this nothing really comes up except that the installation > > might be broken. (See http://r.789695.n4.nabble.com/list-files-erro > > r-message-translateCharUTF8-must-be-called-on-a-CHARSXP- > > td3250302.html) > > > > The strange thing is, that if I copy and paste the command into R > > and execute it, it does not work, but if I copy and paste it into R > > and change that command in a way that should not change its result > > but only add spaces or something like that it might run. E.g. > > changing it to > > > > files <- list.files(path = "/home/username/directory_name/", > > pattern = "*.Rda",, full.names = T, recursive = FALSE) > > > > might work, might not work and return the same error, or might > > execute but when I then type "files" that might return > > > > [1]Error: 'getCharCE' must be called on a CHARSXP > > > > The sessionInfo commmand gives me: > > sessionInfo() > > R version 3.3.2 (2016-10-31) > > Platform: x86_64-redhat-linux-gnu (64-bit) > > Running under: Red Hat Enterprise Linux Server 7.3 (Maipo) > > > > locale: > > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > > [9] LC_ADDRESS=C LC_TELEPHONE=C > > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > > > attached base packages: > > [1] stats graphics grDevices > > utils datasets methods base > > > > uname -mrs gives me: > > Linux 3.10.0-514.el7.x86_64 x86_64 > > > > Any help would be greatly appreciated. > > > > Best regards, > > Stefan Braun > > Just for the record, there's the stackoverflow question > https://stackoverflow.com/questions/45835818/translatecharutf8-must-b > e-called-on-a-charsxp-execution-halted > Cheers > Johannes > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > R-SIG-Fedora mailing list > > R-SIG-Fedora at r-project.org > > https://stat.ethz.ch/mailman/listinfo/r-sig-fedora > > _______________________________________________ > R-SIG-Fedora mailing list > R-SIG-Fedora at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-fedora
Possibly Parallel Threads
- Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
- list.files() error message: 'translateCharUTF8' must be called on a CHARSXP
- RODBC Error: 'getCharCE' must be called on a CHARSXP
- Unstable reproduce for potential issue with CHARSXP creation
- Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP