Skip to content

Instantly share code, notes, and snippets.

@raprasad
Last active February 21, 2017 21:13
Show Gist options
  • Select an option

  • Save raprasad/f1eed21e2d36d19990881ac4adfcc62e to your computer and use it in GitHub Desktop.

Select an option

Save raprasad/f1eed21e2d36d19990881ac4adfcc62e to your computer and use it in GitHub Desktop.
worldmap install notes

(1) Error running paver build with postgis 2.0

  • Error: django.db.utils.DatabaseError: operator class "gist_geometry_ops" does not exist for access method "gist"
  • Last command: django-admin.py migrate --settings=geonode.settings --noinput

Solution from @capooti:

(2) Gazeteer error

  FATAL ERROR - The following SQL query failed: SELECT AddGeometryColumn('gazetteer_gazetteerentry', 'feature', 4326, 'GEOMETRY', 2);
The error was: AddGeometryColumn() - invalid SRID
CONTEXT:  SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5, $6)"
PL/pgSQL function addgeometrycolumn(character varying,character varying,integer,character varying,integer,boolean) line 5 at SQL statement

Error in migration: gazetteer:0001_initial
Traceback (most recent call last):
  File "/Users/rmp553/.virtualenvs/worldmap/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
    result = self.migrate(migration, database)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/migration/migrators.py", line 85, in run_migration
    south.db.db.execute_deferred_sql()
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/db/generic.py", line 318, in execute_deferred_sql
    self.execute(sql)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/pytho  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/south/db/generic.py", line 282, in execute
    cursor.execute(sql, params)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/Users/rmp553/.virtualenvs/worldmap/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: AddGeometryColumn() - invalid SRID
CONTEXT:  SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5, $6)"
PL/pgSQL function addgeometrycolumn(character varying,character varying,integer,character varying,integer,boolean) line 5 at SQL statement

Build failed: Subprocess return code: 1
(worldmap) RAD-rprasad:cga-worldmap rmp553$ PL/pgSQL function addgeometrycolumn(character varying,character varying,integer,character varying,integer,boolean) line 5 at SQL statement
-bash: syntax error near unexpected token `('
(worldmap) RAD-rprasad:cga-worldmap rmp553$ django-admin.py syncdb --settings=geonode.settings --noinput
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment