Accessing DataType of a loaded band throws an exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdal (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When using the GDAL python API (package pyhon3-gdal), attempting to access the data type of a loaded raster's band (via the property DataType) throws the exception:
"in method 'Band_DataType_
The issue was limited (in my case) to Ubuntu 24.04. Discovered on a month-old installation, and reproduced on a second machine using the Ubuntu live (running from a thumb drive) environment with freshly fetched packages (version 3.8.4+dfsg-
When running the same test code on an Ubuntu 22.04 installation (latest available python3-gdal version is 3.4.1+dfsg-1build4) for the same raster, it produces the correct output without throwing any exceptions.
A simple python code to test this:
-------
from osgeo import gdal
from osgeo.gdalconst import GA_ReadOnly
try:
rasterDataType = gdal.Open(
except Exception as e:
print(e)
-------
Several datasets were used in testing. e.g. Landast 8 Collection 2 Level 2 rasters, obtained from https:/
(P.S: This is my first ever bug report. Would appreciate the patience and advice regarding any mistakes or missing information. This report was initiated using ubuntu-bug, unless I misunderstood the process, it collects and includes all the relevant version/package information)
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: python3-gdal 3.8.4+dfsg-3ubuntu3
ProcVersionSign
Uname: Linux 6.8.0-35-generic x86_64
NonfreeKernelMo
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Sat Jun 22 17:59:05 2024
InstallationDate: Installed on 2024-06-01 (21 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
SourcePackage: gdal
UpgradeStatus: No upgrade log present (probably fresh install)