Opened 12 years ago

Closed 11 years ago

#2150 closed defect (duplicate)

histrep.py fails with AttributeError: GetDefaultHistogram

Reported by: cgsbob Owned by: warmerdam
Priority: normal Milestone:
Component: PythonBindings Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

I've been looking for a way to display a rasters histogram and found histrep.py. This is what happens when I try to use it:

bobm@minty:~/src/gis/gdal/swig/python/samples$ ./histrep.py /media/disk/mintc_sg_bob.tif Traceback (most recent call last):

File "./histrep.py", line 92, in <module>

hist = ds.GetRasterBand?(1).GetDefaultHistogram?( force=force )

File "/usr/lib/python2.5/site-packages/GDAL-1.5.0-py2.5-linux-i686.egg/osgeo/gdal.py", line 641, in <lambda>

getattr = lambda self, name: _swig_getattr(self, Band, name)

File "/usr/lib/python2.5/site-packages/GDAL-1.5.0-py2.5-linux-i686.egg/osgeo/gdal.py", line 34, in _swig_getattr

raise AttributeError?,name

AttributeError?: GetDefaultHistogram?

Change History (1)

comment:1 Changed 11 years ago by warmerdam

Component: GDAL_RasterPythonBindings
Resolution: duplicate
Status: newclosed

Bob,

GetDefaultHistogram?() is/was missing from the next generation python bindings. Ticket #2477 addresses adding it in trunk which should get histrep.py working again.

Closing this as a duplicate of #2477.

Note: See TracTickets for help on using tickets.