title: django: can't adapt error when importing data from postgres database
body: <p>I'm having strange error with installing fixture from dumped data. I am using psycopg2, and django1.1.1</p>
  
  <pre><code>silver:probsbox oleg$ python manage.py loaddata /Users/oleg/probs.json 
  Installing json fixture '/Users/oleg/probs' from '/Users/oleg/probs'.
  Problem installing fixture '/Users/oleg/probs.json': Traceback (most recent call last):
    File "/opt/local/lib/python2.5/site-packages/django/core/management/commands/loaddata.py", line 153, in handle
      obj.save()
    File "/opt/local/lib/python2.5/site-packages/django/core/serializers/base.py", line 163, in save
      models.Model.save_base(self.object, raw=True)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/base.py", line 495, in save_base
      result = manager._insert(values, return_id=update_pk)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/manager.py", line 177, in _insert
      return insert_query(self.model, values, **kwargs)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/query.py", line 1087, in insert_query
      return query.execute_sql(return_id)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/sql/subqueries.py", line 320, in execute_sql
      cursor = super(InsertQuery, self).execute_sql(None)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/sql/query.py", line 2369, in execute_sql
      cursor.execute(sql, params)
    File "/opt/local/lib/python2.5/site-packages/django/db/backends/util.py", line 19, in execute
      return self.cursor.execute(sql, params)
  ProgrammingError: can't adapt
  </code></pre>
  
  <p>First I've checked similar issues on internet. This one seemed to be very related: <a href="http://code.djangoproject.com/ticket/5996" rel="nofollow noreferrer">http://code.djangoproject.com/ticket/5996</a>, as my data has many non ASCII symbols</p>
  
  <p>But actually I've checked my django installation and it's ok there</p>
  
  <p>Could you advice what is wrong</p>
  
  <p>====</p>
  
  <p>Continued investigation after added print statement as suggested by the first answer. Log looks this way:</p>
  
  <pre><code>silver:probsbox oleg$ python manage.py loaddata /Users/oleg/probs.json 
  Installing json fixture '/Users/oleg/probs' from '/Users/oleg/probs'.
  &lt;DeserializedObject: Novice&gt;
  &lt;DeserializedObject: Junior&gt;
  &lt;DeserializedObject: Chess enthusiast&gt;
  &lt;DeserializedObject: Experienced player &gt;
  &lt;DeserializedObject: Smart player&gt;
  Problem installing fixture '/Users/oleg/probs.json': Traceback (most recent call last):
    File "/opt/local/lib/python2.5/site-packages/django/core/management/commands/loaddata.py", line 153, in handle
      print obj
    File "/opt/local/lib/python2.5/site-packages/django/core/serializers/base.py", line 155, in __repr__
      return "&lt;DeserializedObject: %s&gt;" % smart_str(self.object)
    File "/opt/local/lib/python2.5/site-packages/django/utils/encoding.py", line 107, in smart_str
      return str(s)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/base.py", line 335, in __str__
      return force_unicode(self).encode('utf-8')
    File "/opt/local/lib/python2.5/site-packages/django/utils/encoding.py", line 71, in force_unicode
      s = unicode(s)
    File "/Users/oleg/Sites/probsbox/registration/models.py", line 58, in __unicode__
      return u"%s's profile" %(self.user.username)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/fields/related.py", line 257, in __get__
      rel_obj = QuerySet(self.field.rel.to).get(**params)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/query.py", line 305, in get
      % self.model._meta.object_name)
  DoesNotExist: User matching query does not exist.
  
  silver:probsbox oleg$ 
  </code></pre>
  
  <p>Error from very last comment</p>
  
  <pre><code>&lt;DeserializedObject: qwert2000's profile&gt;
  </code></pre>
  
  <p>Problem installing fixture '/Users/oleg/probs.json': Traceback (most recent call last):
    File "/opt/local/lib/python2.5/site-packages/django/core/management/commands/loaddata.py", line 154, in handle
      obj.save()
    File "/opt/local/lib/python2.5/site-packages/django/core/serializers/base.py", line 163, in save
      models.Model.save_base(self.object, raw=True)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/base.py", line 495, in save_base
      result = manager._insert(values, return_id=update_pk)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/manager.py", line 177, in _insert
      return insert_query(self.model, values, **kwargs)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/query.py", line 1087, in insert_query
      return query.execute_sql(return_id)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/sql/subqueries.py", line 320, in execute_sql
      cursor = super(InsertQuery, self).execute_sql(None)
    File "/opt/local/lib/python2.5/site-packages/django/db/models/sql/query.py", line 2369, in execute_sql
      cursor.execute(sql, params)
    File "/opt/local/lib/python2.5/site-packages/django/db/backends/util.py", line 19, in execute
      return self.cursor.execute(sql, params)
  ProgrammingError: can't adapt</p>