<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -120,10 +120,14 @@ class DocumentLoader:
         result = [{'key': doc['key'], 'revision': doc['revision'], 'id': doc['id']} for doc in documents]
 
         # insert data
-        data = [dict(thing_id=doc.pop('id'),
-                     revision=doc['revision'], 
-                     data=simplejson.dumps(doc))
-                for doc in documents]
+        try:
+            data = [dict(thing_id=doc.pop('id'),
+                         revision=doc['revision'], 
+                         data=simplejson.dumps(doc))
+                    for doc in documents]
+        except UnicodeDecodeError:
+            print `doc`
+            raise
         self.db.multiple_insert('data', data, seqname=False)
         return result
         </diff>
      <filename>openlibrary/utils/bulkimport.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0edeb357bc534174816ffc51ffbb44b047102110</id>
    </parent>
  </parents>
  <author>
    <name>Edward Betts</name>
    <email>edward@archive.org</email>
  </author>
  <url>http://github.com/openlibrary/openlibrary/commit/6ebba8751b1c3807484ad290f5f6eaea12d9ef27</url>
  <id>6ebba8751b1c3807484ad290f5f6eaea12d9ef27</id>
  <committed-date>2009-11-06T08:34:32-08:00</committed-date>
  <authored-date>2009-11-06T08:34:32-08:00</authored-date>
  <message>add an exception handler</message>
  <tree>1a343b5527d8582549b961dc34c03a64aca49426</tree>
  <committer>
    <name>Edward Betts</name>
    <email>edward@archive.org</email>
  </committer>
</commit>
