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

Postgis error: TypeError: 'NoneType' object has no attribute '__getitem__' #111

Open
rotsee opened this issue Sep 8, 2014 · 0 comments
Open

Comments

@rotsee
Copy link

rotsee commented Sep 8, 2014

I constantly get the error TypeError: 'NoneType' object has no attribute '__getitem__' when using a postgis table as a layer source. Any ideas on how to troubleshoot? Here is traceback:

 File "createMap2.py", line 201, in <module>
   K.generate(config, outfile=fullfilename)
 File "/usr/local/lib/python2.7/dist-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/kartograph.py", line 46, in generate
   _map = Map(opts, self.layerCache, format=format)
  File "/usr/local/lib/python2.7/dist-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/map.py", line 42, in __init__
   layer = MapLayer(layer_id, layer_cfg, me, layerCache)
 File "/usr/local/lib/python2.7/dist-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/maplayer.py", line 35, in __init__
 self.source = handle_layer_source(self.options, self.cache)
 File "/usr/local/lib/python2.7/dist-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/layersource/__init__.py", line 49, in handle_layer_source
   src = PostGISLayer(src[8:], query=layer['query'], table=layer['table'])
 File "/usr/local/lib/python2.7/dist-packages/kartograph.py-0.6.8-py2.7.egg/kartograph/layersource/postgislayer.py", line 39, in __init__
   self.geom_col = cur.fetchone()[0]

TypeError: 'NoneType' object has no attribute 'getitem'

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