1

我的生成代码有错误,这是我的代码

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.

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

4

0 回答 0