I'm trying to get a small script to run using Whitebox's Scripter:
print("Running script")
# data path
whiteboxdp = "/Users/analytics/dem_catchment/sites/Southwold/whitebox_files/"
# set local working directory
pluginHost.setWorkingDirectory(whiteboxdp)
# Calculate dem fill
base_dem = whiteboxdp + "Southwold_lidar_dem_2m_full.dep"
filled_dem = whiteboxdp + "SW_filled.dep"
flatIncrement = "0.0001"
args = [base_dem, filled_dem, flatIncrement]
# does nothing that I can see, no processing or output
pluginHost.runPlugin("FillDepression", args, False, False)
print("Script finished")
When I execute/run the script I just instantly get:
Running script
Script finished
No errors or other warnings. No content generated. I looked at the example by John Lindsay but I feel that I'm not using this correctly as it's not implementing any of the toolbox calls.
What am I doing wrong?
print("error caught..")
instruction in the catch block. – elrobis Jan 25 '17 at 15:56os.listdir(whiteboxdp)
. The 'try - catch' suggestion won't work as no errors are thrown. – Cyrille Jan 25 '17 at 22:02