# Unhashable type: 'dict' (python)

**URL:** <https://discuss.elastic.co/t/unhashable-type-dict-python/181876>\
**Category:** Elasticsearch\
**Created:** [May 20, 2019, 4:57pm UTC](https://discuss.elastic.co/t/unhashable-type-dict-python/181876 "2019-05-20T16:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iukea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iukea/32/49083_2.png) [@iukea](https://discuss.elastic.co/u/iukea)\
**Post date:** [May 20, 2019, 4:57pm UTC](https://discuss.elastic.co/t/unhashable-type-dict-python/181876/1 "2019-05-20T16:57:11Z")

</div>

Hello,

I keep on getting the following error message, and I am scratching my head now pretty hard. Any suggestions?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b6dbd0e786fe0e055ade0c93adb784fbfd088288.png)

```
res = es.search(
				scroll = '2m',
                index = "logstash-*",
                body = {
{
  "aggs": {
    "2": {
      "terms": {
        "field": "src_ip.keyword",
        "size": 50,
        "order": {
          "1": "desc"
        }
      },
      "aggs": {
        "1": {
          "cardinality": {
            "field": "src_ip.keyword"
          }
        }
      }
    }
  },
  "size": 0,
  "_source": {
    "excludes": []
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    {
      "field": "@timestamp",
      "format": "date_time"
    },
    {
      "field": "flow.start",
      "format": "date_time"
    },
    {
      "field": "timestamp",
      "format": "date_time"
    },
    {
      "field": "tls.notafter",
      "format": "date_time"
    },
    {
      "field": "tls.notbefore",
      "format": "date_time"
    }
  ],
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "@timestamp": {
              "gte": 1555777931992,
              "lte": 1558369931992,
              "format": "epoch_millis"
            }
          }
        }
      ],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": [],
    }
  }
}
})
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 17, 2019, 4:57pm UTC](https://discuss.elastic.co/t/unhashable-type-dict-python/181876/2 "2019-06-17T16:57:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
