python3 fix for ElasticSearch backend error message