2

I just installed RSelenium from github (I have the same issue when I install it via cran) and I get the following error in windows machine:

Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText ==  : 
  argument is of length zero
In addition: Warning message:
running command '"wmic" path win32_process get Caption,Processid,Commandline /format:htable' had status 44210 

From the function startServer() this is the part that is producing the error:

system2("wmic", args = c("path win32_process get Caption,Processid,Commandline", 
                                    "/format:htable"), stdout = TRUE, stderr = NULL)

When I run this part I get the following:

character(0)
attr(,"status")
[1] 44210
Warning message:
running command '"wmic" path win32_process get Caption,Processid,Commandline /format:htable' had status 44210 

My sessionInfo()

R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] RSelenium_1.4.2 XML_3.98-1.4    RJSONIO_1.3-0   RCurl_1.95-4.8  bitops_1.0-6   

loaded via a namespace (and not attached):
 [1] httr_1.2.1      R6_2.1.2        tools_3.3.1     withr_1.0.1     curl_1.0        memoise_1.0.0   knitr_1.13      git2r_0.15.0   
 [9] caTools_1.17.1  digest_0.6.9    devtools_1.11.1
dimitris_ps
  • 5,849
  • 3
  • 29
  • 55
  • What is returned if you run `system2("wmic", args = c("path win32_process get Caption,Processid,Commandline", "/format:htable"), stdout = TRUE, stderr = NULL)` in your R session? – jdharrison Aug 13 '16 at 14:01
  • @jdharrison i will update the question – dimitris_ps Aug 13 '16 at 14:03
  • Can you run `WMIC path win32_process get Caption,Processid,Commandline /format:htable` on a win 7 commandline and report what it gives thanks. – jdharrison Aug 13 '16 at 14:11
  • @jdharrison `Invalid GET Expression.` from power shell, and `Invalid XSL format file name` from `cmd` Thanks for looking into this. – dimitris_ps Aug 13 '16 at 15:01
  • And if you run `WMIC path win32_process get Caption^,Processid^,Commandline /format:htable` in the win 7 commandline? – jdharrison Aug 13 '16 at 15:05
  • `Invalid XSL format file name`. – dimitris_ps Aug 13 '16 at 15:07
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/120871/discussion-between-jdharrison-and-dimitris-ps). – jdharrison Aug 13 '16 at 15:09

1 Answers1

3

It is an issue with Win 7.

A htable XSL stylesheet is used to format the output of WMIC path win32_process

It results as a mismatch when using regional settings. Possible workarounds given are:

  1. Copy or move the C:\Windows\system32\wbem\en-US*.xsl files up into the C:\Windows\system32\wbem\ folder.
  2. Change your regional settings to match your Windows language version, log out and back in.
  3. Specify the full path: WMIC process get /format:"%WINDIR%\System32\wbem\en-US\csv"

as noted in wmic error (invalid XSL format) in windows7

Community
  • 1
  • 1
jdharrison
  • 30,085
  • 4
  • 77
  • 89