[gdal-dev] Tiff error with python Autotests on GDAL v3.9.3
Parveen Sharma
sharma1981 at outlook.com
Tue Jan 28 22:08:13 PST 2025
Hello
I have built GDAL from source v3.9.3 tag (https://github.com/OSGeo/gdal/tree/v3.9.3). While building GDAL I passed below CMAKE flags
GDAL_USE_LIBTIFF_INTERNAL=ON
GDAL_USE_GEOTIFF_INTERNAL=ON
Later, I am trying run Python autotests
1.
After following the instructions about Autotests when I issue the below command
pytest autotest --collect-only
1.
Then I am seeing below error
1.
=================================== ERRORS ====================================
________________ ERROR collecting autotest/test_random_tiff.py ________________
C:\workarea\IWS\depot\Mainline\Generation_3\sources_thirdparty\Source\gdal\gdal\autotest\test_random_tiff.py:165: in <module>
ds = gdal.Open("/vsimem/test.tif")
C:\workarea\IWS\depot\Mainline\Generation_3\sources_thirdparty\Source\gdal\build_RelWithDebInfo\swig\python\osgeo\gdal.py:8860: in Open
return _gdal.Open(*args)
E RuntimeError: test.tif: MissingRequired:TIFF directory is missing required "StripOffsets" field
E May be caused by: test.tif: TIFFFetchNormalTag:Defined set_field_type of custom tag 49091 (Tag 49091) is TIFF_SETGET_UNDEFINED and thus tag is not read from file
E May be caused by: test.tif: TIFFFetchNormalTag:Defined set_field_type of custom tag 0 (Tag 0) is TIFF_SETGET_UNDEFINED and thus tag is not read from file
E May be caused by: test.tif: TIFFFetchNormalTag:Defined set_field_type of custom tag 5376 (Tag 5376) i
------------------------------- Captured stdout -------------------------------
iter = 1, comb_val_init = 11573492
------------------------------- Captured stderr -------------------------------
Warning 1: test.tif: TIFFReadDirectoryCheckOrder:Invalid TIFF directory; tags are not sorted in ascending order
1.
1.
The https://github.com/OSGeo/gdal/blob/v3.9.3/autotest/test_random_tiff.py attempts to open "/vsimem/test.tif" which seems like in-memory file.
1.
b) Upon seeing error in (a) , I added the location of "tiff.dll" in the PATH environment variable. Upon re-running the same command (pytest autotest --collect-only) now I get the below error
1.
=================================== ERRORS ====================================
________________ ERROR collecting autotest/test_random_tiff.py ________________
C:\workarea\IWS\depot\Mainline\Generation_3\sources_thirdparty\Source\gdal\gdal\autotest\test_random_tiff.py:165: in <module>
ds = gdal.Open("/vsimem/test.tif")
C:\workarea\IWS\depot\Mainline\Generation_3\sources_thirdparty\Source\gdal\build_RelWithDebInfo\swig\python\osgeo\gdal.py:8860: in Open
return _gdal.Open(*args)
E RuntimeError: test.tif: TIFFReadDirectory:Cannot handle zero number of strips
------------------------------- Captured stdout -------------------------------
iter = 1, comb_val_init = 11967072
1.
1.
Do I really need an external TIFF/GEOTIFF library with the CMAKE flags I passed while building from source?
2.
How I can get rid of the TIFF errors I am seeing above.
Please suggest what am I doing wrong to fix this.
Best Regards
Parveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250129/c0a83d99/attachment-0001.htm>
More information about the gdal-dev
mailing list