Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about shapefile
#3
You're right. It was the name of the file. But even after I changed the problem exists.

The code:
import shapefile
 
ctr = shapefile.Reader('/Users/oze/SHP/')
And...

Error:
runfile('C:/Users/oze/.spyder/test5.py', wdir='C:/Users/oze/.spyder') Traceback (most recent call last): File "<ipython-input-17-723d523bc0ed>", line 1, in <module> runfile('C:/Users/oze/.spyder/test5.py', wdir='C:/Users/oze/.spyder') File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace) File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "C:/Users/oze/.spyder/test5.py", line 1, in <module> import shapefile ImportError: bad magic number in 'shapefile': b'\x03\xf3\r\n'
Reply


Messages In This Thread
Question about shapefile - by oz1988 - Jul-25-2018, 07:48 AM
RE: Question about shapefile - by buran - Jul-25-2018, 07:53 AM
RE: Question about shapefile - by oz1988 - Jul-25-2018, 09:10 AM
RE: Question about shapefile - by buran - Jul-25-2018, 09:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating a Point from coordinate fields in shapefile stixmagiggins 0 1,648 Aug-28-2019, 06:33 AM
Last Post: stixmagiggins

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020