-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whitebox 2.3.3 (Python): Unrecognized tool name ConditionalEvaluation #411
Comments
This seems a WBT frontend issue. Please report it at https://github.com/opengeos/whitebox-python |
Thanks for the fast feedback @giswqs. |
Opened again. The problem for me is that I cannot revert back to whitebox-python version 2.3.1, because the papi package install seems also broken |
The pypi package automatically downloads the last WBT binary from whiteboxgeo.com. It is not broken. This issue is probably caused by the WBT binary, which doesn't contain the tool you want to use |
@giswqs I can confirm that the zip files for v2.4 do contain the binary for the conditional evaluation tool. I'm not sure exactly what is causing this error, but I'll take a closer look when I get a chance. |
I notice the Binary is trying to call the tool Confiditionalevaluation. Note the lower case e for evaluation. Would that be an issue? |
Maybe an frontend issue when converting between snake case and camel case? I am not quite sure. Need to look into it |
Thanks for looking into that and very much appreciated if this could be solved relatively soon. |
Okay, I've just tested with the following script: from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
print(wbt.version())
wbt.set_working_dir('/Users/johnlindsay/Documents/data/Guelph/')
wbt.conditional_evaluation(
"campus_DSM.tif",
"tmp1.tif",
statement="value>250",
true="campus_DSM.tif",
false="1.0",
) And I got this successful output:
I also tested with the Whitebox Runner and it also worked without issue. I suspect therefore that this is an issue with the PyPi frontend and not the Whitebox backend. |
Thanks for testing it out. I will look into the pypi frontend |
@jblindsay I did some experiments and found something interesting. The following comand works fine when the WBT binary stays within the WBT folder. However, if we move the binary outside the WBT folder, the following command will fail to find the tool, specificly the
|
Disclaimer: co-worker of @geotom here.
I could reproduce this, and I suspect this could be due to some static linking within the WBT directory. An easy workaround is to create a symbolic link to the |
@giswqs WhiteboxTools assumes a certain file structure. You cannot move the |
Yeah, I figured it out earlier. I just need to move the plugins folder as well so that both the binary and plugins folder are under the same directory. opengeos/whitebox-python#68 |
I still think this is a frontend issue. If the tools works in the Whitebox Runner, then it's not on the backend. |
FYI, we just opened a follow-up issue on the front-end repository: opengeos/whitebox-python#69. Mentioning it here because it is tightly bound to the back-end as well. |
This issue has been resolved in opengeos/whitebox-python#68. It can be closed now. |
Error
I noticed that since the recent release 2.3.3 on PyPi (https://pypi.org/project/whitebox/2.3.3/) a script of mine fails with the following whitebox debug logs
Code
The code has not changed and calls this function as follows:
What could the issue be?
The text was updated successfully, but these errors were encountered: