We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e0eb3f commit fea7320Copy full SHA for fea7320
1 file changed
ee_mcp/server.py
@@ -235,6 +235,14 @@ def filter_image_by_threshold(
235
image_path,
236
threshold,
237
)
238
+ if threshold != "mean":
239
+ try:
240
+ threshold = float(threshold)
241
+ except (ValueError, TypeError) as e:
242
+ msg = f"Invalid threshold value '{threshold}': must be a number or 'mean'"
243
+ logger.exception(msg)
244
+ raise ValueError(msg) from e
245
+
246
res = handle_filter_image_by_threshold(image_path, threshold)
247
result_path = f"{'/'.join(image_path.split('/')[:-1])}/{result_name}.json"
248
save_ee_object(result_path, res)
0 commit comments