Question about shapefile - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Question about shapefile (/thread-11771.html) |
Question about shapefile - oz1988 - Jul-25-2018 Hi, I'm using anaconda version 1.8.7 Spyder 3.2.8 Python 3.6 This is my code: import shapefile ctr = shapefile.Reader('/Users/oze/SHP/')I get the following error: AttributeError: module 'shapefile' has no attribute 'Reader' Anyone have an idea ? TNX Oz RE: Question about shapefile - buran - Jul-25-2018 Please, ALWAYS post the entire traceback that you get. We need to see the whole thing - it has important information. Do not just give us the last line. Take a time to read What to include in a post In this case, I put my money on your filename to be shapefile.py. Is that the case? This is something we would see in the traceback, if it was the entire one. Rename your file name to be something different from shapefile.py RE: Question about shapefile - oz1988 - Jul-25-2018 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...
RE: Question about shapefile - buran - Jul-25-2018 https://stackoverflow.com/a/514395/4046632 I would guess ghost shapefile.pyc from the previous run makes a problem |