SystemError raised by Python bindings on Python 3.5
|Reported by:||damienayers||Owned by:||hobu|
I seem to have encountered the issue described in swig/swig#567 in python 3.5
from osgeo import ogr def make_geom(): geom = ogr.Geometry(ogr.wkbPoint) geom.AddPoint_2D(0, 0) return geom def gen_list(N): for i in range(N): geom = make_geom() yield i N = 10 print('gen', list(gen_list(N)))
SystemError: <built-in function delete_Geometry> returned a result with an error set
The issue has been resolved in SWIG 3.0.8 but the bindings in the GDAL sources are generated with SWIG 2.0.12.
Regenerating the bindings with the latest SWIG resolves the issue, but also adds libpcre as a run-time dependency.