-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
gdal_calc incorrectly reports requiring no arguments for the --debug option #11312
Comments
In the beginning of this Python script I read |
Yes, I've seen that as well. But from I've gathered the, the arguments to the function are not the raw arguments passed to the command line - rather, the command line arguments first get parsed by |
Interesting, --quiet is configured in the same way but
|
--debug is handled by generic GDAL parsing argument code, before the rest of gdal_calc has a chance to see it |
What is the bug?
the help page gdal_calc lists a
--debug
option, but says that it requires no arguments. In reality however, it seems to require a int value passed - the more sensible options being0
,1
(buttrue
andfalse
also work)Steps to reproduce the issue
returns
ERROR 1: --debug option given without debug level.
Passing
--debug
before another option results in a cryptic error message:gdal_calc.bat --calc "A+B" --format SAGA --type Float32 -A foo --A_band 1 -B bar --B_band 1 --debug --outfile baz
returns:
gdal_calc.py: error: argument --B_band: invalid int value: 'baz'
Versions and provenance
OS: Windows 11
GDAL version: GDAL 3.9.3, released 2024/10/07 (the newest available version)
Source of the GDAL binary: OSGeo4W
Additional context
No response
The text was updated successfully, but these errors were encountered: