Opened 7 years ago

Closed 7 years ago

#7705 closed (fixed)

GDAL datasource bug

Reported by: denis@… Owned by: jbronn
Component: GIS Version: gis
Severity: Keywords: gdal datasource
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by jbronn)

When I did this:

from django.contrib.gis.gdal import DataSource
ds = DataSource(fn)
for layer in ds:
 for item in layer:
  print item.geom, item.fields

I got that:

  File "../basescript.py", line 24, in importInteractiveLayer
    print item.geom, item.fields
  File "/usr/lib/python2.5/site-packages/django/contrib/gis/gdal/feature.py", line 87, in fields
    for i in xrange(self.num_fields)]
NameError: global name 'get_field_name' is not defined

I'm using gdal 1.5.1 and geodjango revision 7870

Change History (4)

comment:1 Changed 7 years ago by Karen Tracey <kmtracey@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from SVN to gis

comment:2 Changed 7 years ago by jbronn

  • Component changed from Uncategorized to GIS
  • Description modified (diff)
  • Keywords gdal datasource added
  • Owner changed from nobody to jbronn

comment:3 Changed 7 years ago by jbronn

  • Status changed from new to assigned

Yup, this is a bug caused by forgetting to import a ctypes prototype function. This will be fixed soon.

comment:4 Changed 7 years ago by jbronn

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7880]) gis: Fixed #7705; forgot to import get_field_name from the ctypes prototypes. Thanks, Denis.

Note: See TracTickets for help on using tickets.
Back to Top