out_lyr = out_ds.CreateLayer('wind_farm', wind_lyr.GetSpatialRef(), ogr.wkbPolygon)
AttributeError: 'NoneType' object has no attribute 'CreateLayer'
编程小白看不懂什么意思,,,怎么改啊?
out_ds没实例化,一般前面需要有类似
out_ds = 某种类型()追问前面有这个
out_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(out_fn)
转到CreateDataSource的代码,可能有某个地方写了return None,然后再看为什么会返回None。
本回答被提问者和网友采纳