Opened 8 years ago

Last modified 8 years ago

#6297 closed defect

CopyDataSource causes segmentation fault in python — at Version 1

Reported by: sourish Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.0.1
Severity: normal Keywords:
Cc:

Description (last modified by sourish)

Hello,

I'm trying to copy a shapefile data source into memory to add a field. However, it segfaults at the CopyDataSource step. Here's the code I'm using:

from osgeo import ogr, gdal
shapefile = 'TM_WORLD_BORDERS-0.3.shp'
orig_data_source = ogr.Open(shapefile)
driver = ogr.GetDriverByName("Memory")
source_ds = driver.CopyDataSource(orig_data_source, "temp_name")

The shapefile I'm using is from http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip and I've used it before for many other purposes. I've tried doing this with gdal 2.0.1 as well as gdal 1.11.2. I'm using python 2.7.6. What am I missing?

Thanks, Sourish

Change History (1)

comment:1 by sourish, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.