Skip to content

Instantly share code, notes, and snippets.

@ejel
Created July 21, 2011 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejel/1098188 to your computer and use it in GitHub Desktop.
Save ejel/1098188 to your computer and use it in GitHub Desktop.
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/query.py", line 334, in count
return self.query.get_count(using=self.db)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/query.py", line 401, in get_count
number = obj.get_aggregation(using=using)[None]
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/contrib/gis/db/models/sql/query.py", line 85, in get_aggregation
return super(GeoQuery, self).get_aggregation(using)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/query.py", line 367, in get_aggregation
result = query.get_compiler(using).execute_sql(SINGLE)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 725, in execute_sql
sql, params = self.as_sql()
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 68, in as_sql
where, w_params = self.query.where.as_sql(qn=qn, connection=self.connection)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/where.py", line 92, in as_sql
sql, params = child.as_sql(qn=qn, connection=connection)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/where.py", line 95, in as_sql
sql, params = self.make_atom(child, qn, connection)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/contrib/gis/db/models/sql/where.py", line 50, in make_atom
return super(GeoWhereNode, self).make_atom(child, qn, connection)
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/db/models/sql/where.py", line 166, in make_atom
if (len(params) == 1 and params[0] == '' and lookup_type == 'exact'
File "/Users/ong/.virtualenvs/spatiallab/lib/python2.6/site-packages/django/contrib/gis/db/backends/postgis/adapter.py", line 24, in __eq__
return (self.ewkb == other.ewkb) and (self.srid == other.srid)
AttributeError: 'str' object has no attribute 'ewkb'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment