test_shape is broken since OTB 8.2
It looks like since OTB issue https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2288 has been fixed, this has broken the pyotb. (see discussion in !49 )
How to reproduce
Use OTB after https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/932
Code
import pyotb
img_pth = "/vsicurl/https://gitlab.orfeo-toolbox.org/orfeotoolbox/" \
"otb/-/raw/develop/Data/Input/SP67_FR_subset_1.tif?inline=false"
bm = pyotb.BandMath({"il": [img_pth], "exp": "im1b1"})
bm.write("/tmp/toto.tif") # Comment this line --> Works
print(bm.shape)
Output
itk::ERROR: BandMath(0x12d7870): Call Execute() or ExecuteAndWriteOutput() before trying to reach output image information
Note
It works perfectly with
The bug comes from OTB.
See https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2322otbApplication
Edited by Cresson Remi