[annotator-dev] annotator store run.py problem - TypeError: ResultSet indices must be integers, not str
johnny jiang
johnny.nan.jiang at gmail.com
Sat May 26 05:27:16 UTC 2012
Hi Nick,
CentOS 6.2
Python 2.7
Flask 0.8
Pyes 0.19.0
ElasticSearch 0.19.2
detailed log as below, do you have idea around the one in red? Thanks a lot.
Traceback *(most recent call last)*
- File "/usr/local/lib/python2.7/site-packages/flask/app.py", line *1518*,
in __call__
return self.wsgi_app(environ, start_response)
- File "/usr/local/lib/python2.7/site-packages/flask/app.py", line *1506*,
in wsgi_app
response = self.make_response(self.handle_exception(e))
- File "/usr/local/lib/python2.7/site-packages/flask/app.py", line *1504*,
in wsgi_app
response = self.full_dispatch_request()
- File "/usr/local/lib/python2.7/site-packages/flask/app.py", line *1264*,
in full_dispatch_request
rv = self.handle_user_exception(e)
- File "/usr/local/lib/python2.7/site-packages/flask/app.py", line *1262*,
in full_dispatch_request
rv = self.dispatch_request()
- File "/usr/local/lib/python2.7/site-packages/flask/app.py", line *1248*,
in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
- File
"/home/jiangnan/dev/projects/workspace_aptana/okfn/src/server/annotator-store/annotator/store.py",
line *46*, in index
annotations = Annotation.search(_user_id=user, _consumer_key=consumer)
- File
"/home/jiangnan/dev/projects/workspace_aptana/okfn/src/server/annotator-store/annotator/elasticsearch.py",
line *118*, in search
*docs = res['hits']['hits']*
- File "/usr/local/lib/python2.7/site-packages/pyes/es.py", line *1780*,
in __getitem__
self.__class__.__name__, val.__class__.__name__))
TypeError: ResultSet indices must be integers, not str
On Tue, May 22, 2012 at 8:35 PM, Nick Stenning <nick at whiteink.com> wrote:
> On 22/05/2012 11:17, johnny jiang wrote:
> > Hi guys,
> >
> > Just wondering if any of you have come across the following Python error
>
> What version of PyES are you using? And what version of ElasticSearch?
>
> -N
>
>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/annotator-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20120526/ae4aa19e/attachment-0003.html>
More information about the annotator-dev
mailing list