在__init__中引发异常行1029

时间:2018-11-17 19:43:21

标签: python pip gis shapefile pyshp

我的生成代码出错,这是我的代码

import shapefile
w=shapefile.Writer()
w.shapeType

w.field("kolom1","C")
w.field("kolom2","C")

w.record("ngek","satu")
w.record("ngok","dua")

w.point(1,1)
w.point(2,2)

w.save("soal1")

我有这个问题...

python soal1.py
Traceback (most recent call last):
  File "soal1.py", line 2, in <module>
    w=shapefile.Writer()
  File "C:\Users\Fathi-PC\AppData\Local\Programs\Python\Python36\lib\site-packages\shapefile.py", line 1029, in __init__
    raise Exception('Either the target filepath, or any of shp, shx, or dbf must be set to create a shapefile.')
Exception: Either the target filepath, or any of shp, shx, or dbf must be set to create a shapefile.

有没有人可以帮助我.. ??

0 个答案:

没有答案