[Gdal-dev] problem with new pyton-gdal
Fulko van Westrenen
Fulko.vanWestrenen at dto.tudelft.nl
Tue Feb 10 10:30:23 EST 2004
Hello,
I upgraded my system, and after the upgrade my Python program using
gdal does not work anymore (what's new... :)
The old system was Debian Woody, with gdal 1.1.9 on Python 2.2.
The new one is Debian Sarge/testing, with gdal 1.2+cvs.031111-1 on
Python 2.3. I rolled the 1.1.9 package myself, the 1.2+cvs.031111-1
is prebuild.
The error message is:
Traceback (most recent call last):
File "./try37n.gtk.py", line 2887, in ?
main()
File "./try37n.gtk.py", line 2645, in main
load_map()
File "./try37n.gtk.py", line 569, in load_map
bouyslat=load_objects(dataset,'BOYLAT')
File "./try37n.gtk.py", line 511, in load_objects
objects=dataset.GetLayerByName( name )
File "/usr/lib/python2.3/site-packages/ogr.py", line 286, in GetLayerByName
raise IndexError, 'No layer %s on datasource' % name
IndexError: No layer BOYLAT on datasource
The offending code (snippets):
import osr
import ogr
...
(def load_map())
infile='./US5TX51M.000'
dataset = ogr.Open( infile )
bouyslat=load_objects(dataset,'BOYLAT')
...
(def load_objects())
objects=dataset.GetLayerByName( name )
GetLayerCount() reports 4 layers, there should be 57(?)
Downgrading is not an option. Does anyone have an idea what is wrong?
Thanks,
Fulko
--
Fulko van Westrenen
Fulko.vanWestrenen at DTO.TUDelft.NL
More information about the Gdal-dev
mailing list