{"action":"closed","issue":{"url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/981","labels_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/981/labels{/name}","comments_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/981/comments","events_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/981/events","html_url":"https://github.com/rtfd/readthedocs.org/issues/981","id":46262631,"number":981,"title":"json error when loaddata test_data with elasticsearch backend","user":{"login":"tdewolf","id":572700,"avatar_url":"https://avatars.githubusercontent.com/u/572700?v=3","gravatar_id":"","url":"https://api.github.com/users/tdewolf","html_url":"https://github.com/tdewolf","followers_url":"https://api.github.com/users/tdewolf/followers","following_url":"https://api.github.com/users/tdewolf/following{/other_user}","gists_url":"https://api.github.com/users/tdewolf/gists{/gist_id}","starred_url":"https://api.github.com/users/tdewolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdewolf/subscriptions","organizations_url":"https://api.github.com/users/tdewolf/orgs","repos_url":"https://api.github.com/users/tdewolf/repos","events_url":"https://api.github.com/users/tdewolf/events{/privacy}","received_events_url":"https://api.github.com/users/tdewolf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-20T11:52:53Z","updated_at":"2015-05-28T11:56:46Z","closed_at":"2015-05-28T11:56:46Z","body":"What I did: \r\nInstall RTD according procedure on http://read-the-docs.readthedocs.org/en/latest/install.html until\r\n\"syncdb\" and \"migrate\", included.\r\nThen install elasticsearch 0.9.10, install plugins elasticsearch/marvel/latest and elasticsearch/elasticsearch-analysis-icu/2.0.0 and run elasticsearch \r\nExecute in rtd: ./manage loaddata test_data\r\n\r\nWhat I get:\r\n```(venv)thomas@gitserver:~/venv/sources/readthedocs.org/readthedocs$ ./manage.py loaddata test_data\r\n[20/Oct/2014 06:42:54] INFO [requests.packages.urllib3.connectionpool:180] Starting new HTTP connection (1): 127.0.0.1\r\n[20/Oct/2014 06:42:56] ERROR [celery_haystack.tasks.CeleryHaystackSignalHandler:150] <User: thomas> is not JSON serializable\r\nTraceback (most recent call last):\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/celery_haystack/tasks.py\", line 148, in run\r\n    current_index.update_object(instance, **handler_options)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/haystack/indexes.py\", line 274, in update_object\r\n    backend.update(self, [instance])\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/haystack/backends/elasticsearch_backend.py\", line 183, in update\r\n    self.conn.bulk_index(self.index_name, 'modelresult', prepped_docs, id_field=ID)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/pyelasticsearch/client.py\", line 96, in decorate\r\n    return func(*args, query_params=query_params, **kwargs)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/pyelasticsearch/client.py\", line 381, in bulk_index\r\n    body_bits.append(self._encode_json(doc))\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/pyelasticsearch/client.py\", line 275, in _encode_json\r\n    return json.dumps(value, cls=self.json_encoder, use_decimal=True)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/simplejson/__init__.py\", line 296, in dumps\r\n    **kw).encode(obj)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/simplejson/encoder.py\", line 226, in encode\r\n    chunks = self.iterencode(o, _one_shot=True)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/simplejson/encoder.py\", line 296, in iterencode\r\n    return _iterencode(o, 0)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/pyelasticsearch/client.py\", line 1009, in default\r\n    return super(JsonEncoder, self).default(value)\r\n  File \"/home/thomas/venv/local/lib/python2.7/site-packages/simplejson/encoder.py\", line 202, in default\r\n    raise TypeError(repr(o) + \" is not JSON serializable\")\r\nTypeError: <User: thomas> is not JSON serializable```"}}