Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape instance has no attribute 'parts' #115

Open
nfs-jd opened this issue Oct 14, 2014 · 0 comments
Open

Shape instance has no attribute 'parts' #115

nfs-jd opened this issue Oct 14, 2014 · 0 comments

Comments

@nfs-jd
Copy link

nfs-jd commented Oct 14, 2014

Traceback (most recent call last):
File "test.py", line 19, in
K.generate(config, outfile='test-file.svg')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/kartograph.py", line 46, in generate
_map = Map(opts, self.layerCache, format=format)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/map.py", line 48, in init
me.proj = me._init_projection()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/map.py", line 88, in _init_projection
map_center = self.__get_map_center()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/map.py", line 140, in __get_map_center
features = self._get_bounding_geometry()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/map.py", line 257, in _get_bounding_geometry
charset=layer.options['charset']
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/layersource/shplayer.py", line 121, in get_features
geom = shape2geometry(shp, ignore_holes=ignore_holes, min_area=min_area, bbox=bbox, proj=self.proj)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/layersource/shplayer.py", line 153, in shape2geometry
geom = shape2polygon(shp, ignore_holes=ignore_holes, min_area=min_area, proj=proj)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/layersource/shplayer.py", line 170, in shape2polygon
parts = shp.parts[:]
AttributeError: _Shape instance has no attribute 'parts'

Can I get help troubleshooting? Script worked fine with a different source file. And pyshp/shapefile has no issue reading this source file on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant