[Gdal-dev] tigerpoly.py GetLayerByName

Simpson asimpson at i-55.com
Thu Mar 10 16:43:02 EST 2005


Your first guess nailed it, whacky cross mounted file systems on different


-----Original Message-----
From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]
Sent: Thursday, March 10, 2005 11:21 AM
To: Simpson
Cc: gdal-dev at xserve.flids.com
Subject: Re: [Gdal-dev] tigerpoly.py GetLayerByName

On Thu, 10 Mar 2005 11:14:09 -0600, Simpson <asimpson at i-55.com> wrote:
> Greetings,
> I am trying to run tigerpoly.py but keep getting:
>  ./tigerpoly.py TGR06001.RT1 test.shp
> Traceback (most recent call last):
>   File "./tigerpoly.py", line 97, in ?
>     poly_layer = ds.GetLayerByName( 'Polygon' )
> AttributeError: DataSource instance has no attribute 'GetLayerByName'
> Having not a clue about python, is this a data issue?
> Using gdal-1.2.6b3 on Linux 2.4.20-20.8


GetLayerByName() isn't a particularly recent addition.
My guesses are:
 o You have quite old Python bindings for GDAL installed
    somewhere and they are getting used instead of the
    new ones.  Try "locate gdal.py" and see if you get any
    surprising items.  Compare the found files to the gdal.py
    in the gdal-1.2.6b3/pymod directory.  Do they match/

 o "ds" is None because the open on the datasource failed.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Gdal-dev mailing list