Skip to content

Instantly share code, notes, and snippets.

@bohde
Created March 26, 2012 17:05
Show Gist options
  • Select an option

  • Save bohde/2206526 to your computer and use it in GitHub Desktop.

Select an option

Save bohde/2206526 to your computer and use it in GitHub Desktop.
Tastypie GIS errors
Failed to install index for gis.GeoNote model: AddGeometryColumns() - invalid SRID
CONTEXT: SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5)"
PL/pgSQL function "addgeometrycolumn" line 5 at SQL statement
Problem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
.F.FFProblem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:00:43] "GET /api/v1/geonotes/?polys__contains=%7B%22coordinates%22%3A%20%5B%5B-122.475233%2C%2037.768616999999999%5D%2C%20%5B-122.470416%2C%2037.767381999999998%5D%5D%2C%20%22type%22%3A%20%22MultiPoint%22%7D HTTP/1.1" 400 56
FProblem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:00:47] "GET /api/v1/geonotes/?points__within=%7B%22type%22%3A%20%22MultiPolygon%22%2C%20%22coordinates%22%3A%20%5B%5B%5B%5B-122.511067%2C%2037.771276%5D%2C%20%5B-122.510037%2C%2037.766391%5D%2C%20%5B-122.510037%2C%2037.763813%5D%2C%20%5B-122.456822%2C%2037.765848%5D%2C%20%5B-122.452960%2C%2037.766459%5D%2C%20%5B-122.454848%2C%2037.773990%5D%2C%20%5B-122.475362%2C%2037.773040%5D%2C%20%5B-122.511067%2C%2037.771276%5D%5D%5D%5D%7D HTTP/1.1" 400 56
FProblem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:00:50] "GET /api/v1/ HTTP/1.1" 200 171
.Problem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:00:54] "GET /api/v1/ HTTP/1.1" 200 292
.Problem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:00:58] "GET /api/v1/geonotes/ HTTP/1.1" 500 88
FProblem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:01:02] "POST /api/v1/geonotes/ HTTP/1.1" 400 71
FProblem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:01:06] "POST /api/v1/geonotes/ HTTP/1.1" 400 71
FProblem installing fixture '/home/joshbohde/code/django-tastypie/tests/gis/fixtures/initial_data.json': Traceback (most recent call last):
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save
models.Model.save_base(self.object, using=using, raw=True)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/joshbohde/.virtualenvs/tastypie/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00
[26/Mar/2012 12:01:09] "POST /api/v1/geonotes/ HTTP/1.1" 400 71
F
======================================================================
FAIL: test_gets (gis.tests.views.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/views.py", line 18, in test_gets
self.assertEqual(resp.status_code, 200)
AssertionError: 500 != 200
======================================================================
FAIL: test_posts (gis.tests.views.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/views.py", line 44, in test_posts
self.assertEqual(resp.status_code, 201)
AssertionError: 400 != 201
======================================================================
FAIL: test_puts (gis.tests.views.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/views.py", line 61, in test_puts
self.assertEqual(resp.status_code, 204)
AssertionError: 500 != 204
======================================================================
FAIL: test_filter_contains (gis.tests.http.HTTPTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/http.py", line 161, in test_filter_contains
self.assertEqual(response.status, 200)
AssertionError: 400 != 200
======================================================================
FAIL: test_filter_within (gis.tests.http.HTTPTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/http.py", line 136, in test_filter_within
self.assertEqual(response.status, 200)
AssertionError: 400 != 200
======================================================================
FAIL: test_get_list (gis.tests.http.HTTPTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/http.py", line 43, in test_get_list
self.assertEqual(response.status, 200)
AssertionError: 500 != 200
======================================================================
FAIL: test_post_geojson (gis.tests.http.HTTPTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/http.py", line 77, in test_post_geojson
self.assertEqual(response.status, 201)
AssertionError: 400 != 201
======================================================================
FAIL: test_post_object (gis.tests.http.HTTPTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/http.py", line 51, in test_post_object
self.assertEqual(response.status, 201)
AssertionError: 400 != 201
======================================================================
FAIL: test_post_xml (gis.tests.http.HTTPTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/gis/tests/http.py", line 100, in test_post_xml
self.assertEqual(response.status, 201)
AssertionError: 400 != 201
----------------------------------------------------------------------
Ran 13 tests in 27.783s
FAILED (failures=9)
Creating test database for alias 'default'...
Destroying test database for alias 'default'...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment