You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case pct2rgb.py is executed against a source raster file without a color table, then the following Python error is displayed:
F:\QGIS\OSGEO4~2.3\qgis\apps\Python39\lib\site-packages\osgeo\gdal.py:290: FutureWarning: Neither gdal.UseExceptions() nor gdal.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.
warnings.warn(
Traceback (most recent call last):
File "F:\QGIS\OSGEO4~2.3\qgis\apps\Python39\lib\site-packages\osgeo_utils\auxiliary\gdal_argparse.py", line 175, in main
self.doit(**kwargs)
File "F:\QGIS\OSGEO4~2.3\qgis\apps\Python39\lib\site-packages\osgeo_utils\pct2rgb.py", line 220, in doit
return pct2rgb(**kwargs)
File "F:\QGIS\OSGEO4~2.3\qgis\apps\Python39\lib\site-packages\osgeo_utils\pct2rgb.py", line 88, in pct2rgb
ct_size = ct.GetCount()
AttributeError: 'NoneType' object has no attribute 'GetCount'
I think it would be better to gracefully handle that case and raise an exception.
Operating system
Windows 10 64 bit
GDAL version and provenance
GDAL 3.7.3 from OSGeo4W
The text was updated successfully, but these errors were encountered:
Expected behavior and actual behavior.
In case pct2rgb.py is executed against a source raster file without a color table, then the following Python error is displayed:
I think it would be better to gracefully handle that case and raise an exception.
Operating system
Windows 10 64 bit
GDAL version and provenance
GDAL 3.7.3 from OSGeo4W
The text was updated successfully, but these errors were encountered: