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

No handlers could be found for logger "pyes" Exception ReferenceError: 'weakly-referenced object no longer exists' in <bound method ES.__del__ of <pyes.es.ES object at 0x7fadda8638d0>> ignored #517

Open
OPSTime opened this issue Jul 18, 2017 · 0 comments

Comments

@OPSTime
Copy link

OPSTime commented Jul 18, 2017

ENV:

Python 2.7.5
pyes (0.99.6)
elasticsearch-2.4.4

script:

#!/bin/env python

import pyes

conn = pyes.es.ES("http://xxx.xxx.xxx.xxx:9200/",basic_auth={"username":"username","password":"password"})
search = pyes.query.MatchAllQuery().search(bulk_read=1000)
hits = conn.search(search, 'logstash-nginxlog_2017-07-14', scan=True, scroll="90m", model=lambda _,hit: hit)
for hit in hits:
hit['_source']['cmd'] = int(hit['_source']['status'])
#print hit['_source']
conn.index(hit['_source'], 'logstash-nginxlog_2017-07-14_new', 'bullet-chat', hit['_id'], bulk=True)

Error output:

No handlers could be found for logger "pyes"
Exception ReferenceError: 'weakly-referenced object no longer exists' in <bound method ES.del of <pyes.es.ES object at 0x7fadda8638d0>> ignored

result:

logstash-nginxlog_2017-07-14 doc:64000034
logstash-nginxlog_2017-07-14_new doc:6400000

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

1 participant