Advertisement
Guest User

tag error

a guest
May 23rd, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. 127.0.0.1 - - [23/May/2017 00:51:59] "POST /tag HTTP/1.1" 500 -
  2. Traceback (most recent call last):
  3. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
  4. return self.wsgi_app(environ, start_response)
  5. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
  6. response = self.handle_exception(e)
  7. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
  8. reraise(exc_type, exc_value, tb)
  9. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
  10. response = self.full_dispatch_request()
  11. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
  12. rv = self.handle_user_exception(e)
  13. File "/usr/local/lib/python2.7/dist-packages/flask_api/app.py", line 103, in handle_user_exception
  14. reraise(exc_type, exc_value, tb)
  15. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
  16. rv = self.dispatch_request()
  17. File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
  18. return self.view_functions[rule.endpoint](**req.view_args)
  19. File "/home/kbot/hybrid_tagger/4_run_api.py", line 36, in tag
  20. tags = ct.tag(data['text'],show_groups=data['show_groups'],show_unconfirmed=data['show_unconfirmed'])
  21. File "/home/kbot/hybrid_tagger/tagger/taggers.py", line 105, in tag
  22. tag_candidates = self.es.get_tag_candidates(text,num_candidates)
  23. File "/home/kbot/hybrid_tagger/tagger/elasticsearch.py", line 63, in get_tag_candidates
  24. for hit in response['hits']['hits']:
  25. KeyError: 'hits'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement