#6749 closed defect (fixed)
SystemError raised by Python bindings on Python 3.5
Reported by: | damienayers | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.0 |
Component: | PythonBindings | Version: | 2.1.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
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)))
produces 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.
Change History (3)
comment:1 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 8 years ago
Milestone: | → 2.2.0 |
---|
Note:
See TracTickets
for help on using tickets.
In 36845: