0

I got a pysolr instance and I try to get this simple query. I use python 2.7 and pysolr 3.3.2:

When I get this query:

solrDoc.search('platformID:RO', **{'rows': 0, 'start':5, 'sort':'id DESC'})

I have this Json exception:

File "/usr/local/lib/python2.7/dist-packages/pysolr.py", line 633, in search
result = self.decoder.decode(response)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")

I can understand how to handle this, because my solr instance is running and I have already query solr with this Python API. I have just updated from solr4 to solr5 but it seems that is not the point.

mathieu
  • 53
  • 7

1 Answers1

0

No, it was not a json problem. It was a connection problem. My adress path lead nowwhere but when I create a pysolr instance (with the wrong adress path) I get no error. But when I query, I get in fact no response... indeed a no response can no be json decoded. It is for sure a mismanagement on exception handlers in pysolr.

mathieu
  • 53
  • 7