toastdriven/pysolr — Issue #42: commitWithin gives serializing error
Author: wichert
Created: 2012-03-06 10:13:49+00:00
State: open

An extract from our errors logs (running under mod_wsgi):

```
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] solr.add([data], commit=None, commitWithin=60 * 1000)
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] File "/opt/s4uadmin/eggs/pysolr-2.0.15-py2.7.egg/pysolr.py", line 686, in add
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] m = ET.tostring(message, encoding='utf-8')
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1121, in tostring
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] ElementTree(element).write(file, encoding, method=method)
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 815, in write
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] serialize(write, self._root, encoding, qnames, namespaces)
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 927, in _serialize_xml
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] v = _escape_attrib(v, encoding)
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1087, in _escape_attrib
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] _raise_serialization_error(text)
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1047, in _raise_serialization_error
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] "cannot serialize %r (type %s)" % (text, type(text).__name__)
[Tue Mar 06 10:11:10 2012] [error] [client 127.0.0.1] TypeError: cannot serialize 60000 (type int)
```