I am trying to use the CompositeBands_management function in a python script and am encountering an error that doesn't make sense to me. I am using the following command:gp.CompositeBands_management("L71029027_02719990831_B10.TIF;L71029027_02719990831_B20.TIF;L71029027_02719990831_B30.TIF","C:/L7029027_02719990831.tif")
Error code:ERROR 000445: Extension is invalid for the output raster format.
Failed to execute (CompositeBands).
According to the documentation I have been able to find, TIFF format seems to be supported for this function and '.tif' is the required file extension. I have tried switching case and removing the absolute paths but have had no joy. I am at a loss and would appreciate any help you could lend. Thanks!The python code looks like:
import arcgisscripting as Arc
gp = Arc.create()
f = lambda x: '"' + x + '"'
bands = f(bands.rstrip(';'))
composite = f(os.path.join(outpath, composite))
gp.workspace = f(os.path.abspath(tmpdir))
gp.CompositeBands_management(bands,composite)