Closed ejjunju closed 1 year ago
Hi, it looks like the path to your whitebox executable is getting shortened to "8.3" style file names. (C:\Users\ejj\AppData\Local\R\WIN-LI~1\4.2\whitebox\WBT\WHITEB~1.EXE
)
This is an unfortunate side effect of system()
calls involving longer paths on Windows. The WhiteboxTools command line tool does not work with this abbreviated name for the whitebox executable (WHITEB~1.EXE) because the name "whitebox_tools" is hard-coded in the part of the tool that parses the command line options--so there is nothing I can do in the R package to fix this, short of changing the way system calls are made to use something like {processx}... which I am not inclined to do for a few reasons.
Here is a report of this issue from when I identified it : https://github.com/jblindsay/whitebox-tools/issues/190
A work-around is to install the binary in a shorter directory path location... something like:
whitebox::install_whitebox(pkg_dir="C:/whitebox")
You will then want to set e.g. wbt_init(exe_path="C:/whitebox/WBT/whitebox_tools.exe")
in later sessions or use an environment variable R_WHITEBOX_EXE_PATH
to point to this installation location
This might actually be different from the issue I linked to above, perhaps you don't have permissions to run an executable in that directory? Nonetheless installing somewhere else that you do have permissions (e.g. Program Files folder) might to the trick.
Closing this due to inactivity. If you are still having trouble please feel free to open a new issue.
I have installed whitebox. The exe is available and the initiation returns TRUE but running operations, even on test data gives an error.
system(exeargs, intern = TRUE, ignore.stderr = ignore.stderr, :
Any tool i choose returns this error. see example