Closed HenrikBengtsson closed 7 years ago
Some more troubleshooting. When I run the following interactively from one of the compute nodes:
> str(sessioninfo::platform_info())
List of 8
$ version : chr "R version 3.4.1 (2017-06-30)"
$ os : chr(0)
$ system : chr "x86_64, linux-gnu"
$ ui : chr "X11"
$ language: chr "en"
$ collate : chr "C"
$ tz : chr NA
$ date : chr "2017-09-03"
- attr(*, "class")= chr "platform_info"
> sessioninfo:::os_name()
character(0)
> utils::sessionInfo()$running
NULL
Looking at the code for utils::sessionInfo()
:
uname <- system("uname -a", intern = TRUE)
os <- sub(" .*", "", uname)
z$running <- switch(os, Linux = if (file.exists("/etc/os-release")) {
tmp <- readLines("/etc/os-release")
t2 <- if (any(startsWith(tmp, "PRETTY_NAME="))) sub("^PRETTY_NAME=",
"", grep("^PRETTY_NAME=", tmp, value = TRUE)[1L]) else if (any(startsWith(tmp,
"NAME"))) sub("^NAME=", "", grep("^NAME=", tmp,
value = TRUE)[1L]) else "Linux (unknown distro)"
sub("\\"(.*)\\"", "\\\\1", t2)
} else if (file.exists("/etc/system-release")) {
readLines("/etc/system-release")
}, Darwin = {
it looks like for os == "Linux"
(which it is on my machine), that it does not guarantee a value, i.e. it returns NULL
if both of those if conditions are false (which they are on my machine).
I think revdepcheck:::report_platform()
need to be updated to not make assumption about all platform fields being non-empty (alternatively, sessioninfo::os_name()
should return NA_character_
).
It looks like this should be resolved in the sessioninfo package, because it makes the same assumption when print()
:ing;
> platform <- sessioninfo: platform_info()
> platform$os <- character(0)
> print(platform)
Error in data.frame(setting = names(x), value = unlist(x), stringsAsFactors = FALSE) :
arguments imply differing number of rows: 8, 7
Enter a frame number, or 0 to exit
1: print(platform)
2: print.platform_info(platform)
3: data.frame(setting = names(x), value = unlist(x), stringsAsFactors = FALSE)
4: stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nr
5: (function ()
{
utils::recover()
})()
Submitted PR https://github.com/r-lib/sessioninfo/issues/8 to fix this there.
Closing, since resolved in sessioninfo.
Another, FYI: While rerunning
which has already been done previously, where I received yet another error as Issue #88, I get:
Troubleshooting
Looking at that dumped frame, I find that:
The problem is that:
assumes that
platform_info()
produce a list of elements all of length one, butplatform$os
is zero length.Session details