[gdal-dev] gdal2tiles error with exclude and vsigs

Martin Ewart mail at martinewart.co.uk
Wed Jan 29 08:50:49 PST 2025


Hi,

I'm just reporting an error with gdal2tiles when running with the --exclude
argument and with the output directory being set to a google bucket using
/vsigs/.
It appears that the absence of a blank tile causes the upload to fail. The
command works fine without --exclude. Full error below the mail.

Thanks,

Martin


Version
GDAL 3.10.1, released 2025/01/08

Error:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib/python3.12/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osgeo_utils/gdal2tiles.py", line
1574, in create_overview_tile
    if not isfile(base_tile_path):
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osgeo_utils/gdal2tiles.py", line
95, in isfile
    return stat.S_ISREG(stat_res.mode)
                        ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'mode'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/gdal2tiles", line 33, in <module>
    sys.exit(load_entry_point('GDAL==3.10.1', 'console_scripts',
'gdal2tiles')())

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osgeo_utils/gdal2tiles.py", line
4676, in main
    return submain(argv, called_from_main=called_from_main)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osgeo_utils/auxiliary/util.py",
line 46, in enable_exceptions_wrapper
    return fun(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osgeo_utils/gdal2tiles.py", line
4706, in submain
    multi_threaded_tiling(input_file, output_folder, options, pool)
  File "/usr/lib/python3.12/site-packages/osgeo_utils/auxiliary/util.py",
line 46, in enable_exceptions_wrapper
    return fun(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osgeo_utils/gdal2tiles.py", line
4618, in multi_threaded_tiling
    for _ in pool.imap_unordered(
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/multiprocessing/pool.py", line 873, in next
    raise value
AttributeError: 'NoneType' object has no attribute 'mode'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250129/c7ecfc2f/attachment.htm>


More information about the gdal-dev mailing list