raise exception line 1029, in __init__

704 Views Asked by At

i have an error at my generate code, this is my code

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")

and i have this problem...

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.

is there anyone can help me..??

0

There are 0 best solutions below