2

I ran into issues setting up Whitebox Tools for R. I installed the whitebox package, downloaded the Whitebox Tools and place them in the R folder in Documents. However, using the functions results in an error message. Even running

print(wbt_version())  

throws an error message:

Error :  

Error running WhiteboxTools
  whitebox.exe_path: "C:/Users/USERNAME/Documents/R/win-library/4.1/whitebox/WBT/whitebox_tools.exe"; File exists? TRUE
  Arguments: --version=  

Error in system(exeargs, intern = TRUE, ignore.stderr = ignore.stderr, : 'CreateProcess' failed to run 'C:\Users\USERNAME\DOCUME~1\R\WIN-LI~1\4.1\whitebox\WBT\WHITEB~1.EXE --version'
[1] "Error : \nError running WhiteboxTools\n  whitebox.exe_path: \"C:/Users/USERNAME/Documents/R/win-library/4.1/whitebox/WBT/whitebox_tools.exe\"; File exists? TRUE\n  Arguments: --version\n\nError in system(exeargs, intern = TRUE, ignore.stderr = ignore.stderr, : 'CreateProcess' failed to run 'C:\\Users\\USERNAME\\DOCUME~1\\R\\WIN-LI~1\\4.1\\whitebox\\WBT\\WHITEB~1.EXE --version'\n\n"

It looks like it can locate the whitebox.exe correctly. However, since it's not working correctly, there seems to be something off with the setup, but I can’t tell what. It seems odd that the file path apparently contains both \ and / (\"C:/Users). I set the whitebox.exe to always run as administrator. I’m on Windows 11, just in case that is relevant information.
Any ideas what I might be missing (or other information I could/should provide)?

8
  • Can you run that .exe from the Windows command line or PowerShell?
    – Spacedman
    Commented Dec 18, 2021 at 9:42
  • Further to the above, I've seen Windows systems set up so that executables in user folders can't run, only system exes and stuff installed "properly" in some sense. Random downloaded .exe files? Ooh no, virus warning virus warning alert alert! If you try running it from the Windows CMD (or maybe double-clicking) you might see an informative warning...
    – Spacedman
    Commented Dec 18, 2021 at 14:01
  • Have you installed whitebox package from CRAN? Or R-Forge? I've got it from CRAN and ran a command whitebox::install_whitebox() which took care of all installation processes. The whitebox tool was installed into the R folder (same as your setting). Looks like it is working properly.
    – Kazuhito
    Commented Dec 19, 2021 at 1:57
  • @Spacedman, I tried running it from the command line. Similar to double clicking, the windows message popped up whether I really want to execute it. I did, but received the same error message in R when I run a whitebox function. I even added the folder and the .exe to the Windows Defender allowed list and disabled the security warnings. Unfortunately, to no avail...
    – Rincewind
    Commented Dec 19, 2021 at 3:09
  • @Kazuhito, I got the whitebox package from CRAN. When I run whitebox::install_whitebox(), it just tells me the installation path of the whitebox_tools.exe.
    – Rincewind
    Commented Dec 19, 2021 at 3:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.