opengeos / whitebox-python

WhiteboxTools Python Frontend
https://pypi.org/project/whitebox/
MIT License
377 stars 68 forks source link

Whitebox 2.3.3 (Python): Unrecognized tool name ConditionalEvaluation #67

Closed geotom closed 3 months ago

geotom commented 3 months ago

This was first posted on the whitebox tracker (https://github.com/jblindsay/whitebox-tools/issues/411)

Description

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

./whitebox_tools --run="ConditionalEvaluation" --wd="/celery" --input='a.tif' --statement=value == minvalue && value < -1000 - -true='b.tif' -v --compress_rasters=True
thread 'main' panicked at whitebox-tools-app/src/main.rs:72:21:
Unrecognized tool name ConditionalEvaluation.
run with `RUST_BACKTRACE=1` environment variable to display a backtrace

What I Did

The code has not changed and calls this function as follows:

wbt.conditional_evaluation(
                                "a.tif",
                                "b.tif",
                                statement="value == minvalue && value < -1000",
                                true="source.tif",
                                false="a.tif",
                            )

What could the issue be?

giswqs commented 3 months ago

I can confirm that this is a WBT backend issue.

image

giswqs commented 3 months ago

I fount that both the ConditionalEvaluation and ConditionedLatinHypercube tools have the same issue. It seems the tools with the word Condition have this problem. Other tools are fine.

giswqs commented 3 months ago

This bug has been fixed. Please update to the latest v2.3.4

image