Error TypeError: unhashable type: 'dict'

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Describe the issue: My OpenSearch was working fine till few hour before. Now I am getting this error

TypeError: unhashable type: 'dict. INFO:Received request for search term side effect of Trulicity in source [‘clinicaltrials_edb’]

INFO:User halder_nayan@lilly.com has access to the ad groups search_discovery_opensearch_saml

request_received_time 2025-10-16 12:48:25.787264-04:00

INFO:For User: halder_nayan@lilly.com fetching 10 results for the term side effect of Trulicity from the indexes clinicaltrials_edb with starting point as 1 and sub filters: None

INFO:Searching the database to fetch fields for index: [‘clinicaltrials_edb’]

-– Logging error —

Traceback (most recent call last):

File “/Users/L006531/basic-search/search-and-discovery-basic-search-dev/api/utils/display_fields.py”, line 54, in extract_display_fields

unique_fields = list(set(flatten(list(field.values()) for field in fields)))

                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: unhashable type: 'dict

Configuration:

Relevant Logs or Screenshots:

@Nayan How is this error OpenSearch-related? It looks like your Python script is failing.

1 Like

The issue is resolved now, It is related with python error.