coderholic/django-cities — Issue #11: geonames_dump not UTF8 compatible
Author: jpic
Created: 2011-11-03 08:51:54+00:00
State: open

>>> time ./manage.py loaddata geonames_dump
Problem installing fixture '/srv/art/art_env/src/cities/cities/fixtures/geonames_dump.json': Traceback (most recent call last):
File "/srv/art/art_env/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 174, in handle
obj.save(using=using)
File "/srv/art/art_env/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 "/srv/art/art_env/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 "/srv/art/art_env/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/srv/art/art_env/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 "/srv/art/art_env/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/srv/art/art_env/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/srv/art/art_env/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/srv/art/art_env/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

./manage.py loaddata geonames_dump 13.49s user 0.59s system 85% cpu 16.390 total

Please let me not if I can provide any other information.