Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunburnt not compatible with newer versions of Solr XML output #52

Closed
kopf opened this issue May 10, 2012 · 4 comments
Closed

Sunburnt not compatible with newer versions of Solr XML output #52

kopf opened this issue May 10, 2012 · 4 comments

Comments

@kopf
Copy link

kopf commented May 10, 2012

>>> import httplib2, sunburnt
>>> h = httplib2.Http()
>>> si = sunburnt.SolrInterface('http://localhost:8983/solr/items', http_connection=h)
>>> si.query(identifier='16dhnwtakze4po5x').execute()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aengus/.virtualenvs/mini_itemsearch/local/lib/python2.7/site-packages/sunburnt/search.py", line 599, in execute
    result = self.interface.search(**self.options())
  File "/home/aengus/.virtualenvs/mini_itemsearch/local/lib/python2.7/site-packages/sunburnt/sunburnt.py", line 213, in search
    return self.schema.parse_response(self.conn.select(params))
  File "/home/aengus/.virtualenvs/mini_itemsearch/local/lib/python2.7/site-packages/sunburnt/schema.py", line 510, in parse_response
    return SolrResponse(self, msg)
  File "/home/aengus/.virtualenvs/mini_itemsearch/local/lib/python2.7/site-packages/sunburnt/schema.py", line 646, in __init__
    details['responseHeader'] = dict(details['responseHeader'])
KeyError: 'responseHeader'

This is with solr 2.4.0. It is caused by the fact that when Sunburnt makes this call, it calls: http://localhost:8983/solr/items/select/?q=identifier%3A16dhnwtakze4po5x . This returns data using <responseHeader> tags, instead of between <lst name="responseHeader"></lst>

Specifying a version of 2.2 functions as a work-around

@kopf
Copy link
Author

kopf commented May 10, 2012

Fixed by #53

@tow
Copy link
Owner

tow commented Dec 24, 2012

Thanks, closing now.

@tow tow closed this as completed Dec 24, 2012
@kopf
Copy link
Author

kopf commented Mar 27, 2013

Should it not be closed once #53 is merged? :)

Did I make a mistake by using the past tense "Fixed"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@tow @kopf and others