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

gs_import_osm -- NameError: global name 'vertices_namespace' is not defined #17

Open
jyaganeh opened this issue Aug 10, 2010 · 1 comment

Comments

@jyaganeh
Copy link

I installed graphserver from git, spatialindex-1.4.0, and RTree 0.5.0 via easy_install, following the instructions.

Running gs_import_osm on map.osm from the test directory fails with the error:

$ gs_import_osm map.gdb map.osmdb
slog values: {}
importing osmdb 'map.osmdb' into graphdb 'map.gdb'
Traceback (most recent call last):
  File "/usr/bin/gs_import_osm", line 9, in <module>
    load_entry_point('graphserver==0.1', 'console_scripts', 'gs_import_osm')()
  File "/usr/lib/python2.6/site-packages/graphserver-0.1-py2.6.egg/graphserver/compiler/gdb_import_osm.py", line 112, in main
    gdb_import_osm(gdb, osmdb, options.namespace, slogs, profiledb);
  File "/usr/lib/python2.6/site-packages/graphserver-0.1-py2.6.egg/graphserver/compiler/gdb_import_osm.py", line 66, in gdb_import_osm
    for i, (vertex1_label, vertex2_label, edge ) in enumerate( edges_from_osmdb( osmdb, vertices_namespace, slogs, profiledb ) ):
NameError: global name 'vertices_namespace' is not defined

Changing 'vertices_namespace' to 'vertex_namespace' on line 66 of compiler/gdb_import_osm.py results in a different error:

$ gs_import_osm map.gdb map.osmdb
slog values: {}
importing osmdb 'map.osmdb' into graphdb 'map.gdb'
0/50664 edges loaded
Traceback (most recent call last):
  File "/usr/bin/gs_import_osm", line 9, in <module>
    load_entry_point('graphserver==0.1', 'console_scripts', 'gs_import_osm')()
  File "/usr/lib/python2.6/site-packages/graphserver-0.1-py2.6.egg/graphserver/compiler/gdb_import_osm.py", line 112, in main
    gdb_import_osm(gdb, osmdb, options.namespace, slogs, profiledb);
  File "/usr/lib/python2.6/site-packages/graphserver-0.1-py2.6.egg/graphserver/compiler/gdb_import_osm.py", line 73, in gdb_import_osm
    gdb.add_edge( vertex1_label, vertex2_label, edge, cursor )
  File "/usr/lib/python2.6/site-packages/graphserver-0.1-py2.6.egg/graphserver/graphdb.py", line 109, in add_edge
    c.execute( "INSERT INTO edges VALUES (?, ?, ?, ?)", (from_v_label, to_v_label, cPickle.dumps( payload.__class__ ), cPickle.dumps( payload.__getstate__() ) ) )
  sqlite3.OperationalError: table edges has 3 columns but 4 values were supplied

Removing the 4th value from the insert statement at graphdb.py:109 allows data to be inserted but when I run gs_gdb_inspect osm-92080455, I get None instead of <Street ...> objects.

@jazzido
Copy link

jazzido commented Aug 20, 2010

I got this too. I'm running on 3f8e646

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

2 participants