GitHub user dosubot[bot] added a comment to the discussion: Warm up charts cache via API
<!-- Answer --> This is a [known bug in Superset versions 4.1.1-4.1.4](https://github.com/apache/superset/issues/31975). The error occurs because the code uses `list(set(extra_cache_keys))` to deduplicate cache keys, but `set()` can't hash list values — which are common when using `IN` filters. **Workaround options:** 1. **Patch the code** — In `superset/connectors/sqla/models.py`, find the line with `list(set(extra_cache_keys))` and change it back to just `return extra_cache_keys` 2. **Upgrade Superset** — Check if a newer version has fixed this issue **Also note:** Your filter value should be a list for the `IN` operator: ```json // Change this: {"col": "Variable", "op": "IN", "val": "speed"} // To this: {"col": "Variable", "op": "IN", "val": ["speed"]} ``` While this isn't the direct cause of the unhashable error (that's the `set()` bug), the [IN operator expects a list/tuple value](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/superset_typing.py#L105-L106) and may cause other issues. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/42dc4f15-6a71-432a-990a-0a40e5d8b11e?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/42dc4f15-6a71-432a-990a-0a40e5d8b11e?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/42dc4f15-6a71-432a-990a-0a40e5d8b11e?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/42dc4f15-6a71-432a-990a-0a40e5d8b11e?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/42dc4f15-6a71-43 2a-990a-0a40e5d8b11e?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/42dc4f15-6a71-432a-990a-0a40e5d8b11e?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report) | [Other](https://app.dosu.dev/response-feedback/42dc4f15-6a71-432a-990a-0a40e5d8b11e?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge) [](https://cursor.com/link/prompt?text=This%20is%20a%20%5Bknown%20bug%20in%20Superset%20versions%204.1.1-4.1.4%5D%28https%3A//github.com/apache/superset/issues/31975%29.%20The%20error%20occurs%20because%20the%20code%20uses%20%60list%28set%28extra_cache_keys%29%29%60%20to%20deduplicate%20cache%20keys%2C%20but%20%60set%28%29%60%20can%27t%20hash%20list%20values%20%E2%80%94%20which%20are%20common%20when%20using%20%60IN%60%20filters.%0A%0A%2A%2AWorkaround%20options%3A%2A%2A%0A%0A1.%20%2A%2APatch%20the%20code%2A%2A%20%E2%80%94%20In%20%60superset/connectors/sqla/models.py%60%2C%20find%20the%20line%20with%20%60list%28set%28extra_cache_keys%29%29%60%20and%20change%20it%20back%20to%20just%20%60return%20extra_cache_keys%60%0A %0A2.%20%2A%2AUpgrade%20Superset%2A%2A%20%E2%80%94%20Check%20if%20a%20newer%20version%20has%20fixed%20this%20issue%0A%0A%2A%2AAlso%20note%3A%2A%2A%20Your%20filter%20value%20should%20be%20a%20list%20for%20the%20%60IN%60%20operator%3A%0A%60%60%60json%0A//%20Change%20this%3A%0A%7B%22col%22%3A%20%22Variable%22%2C%20%22op%22%3A%20%22IN%22%2C%20%22val%22%3A%20%22speed%22%7D%0A%0A//%20To%20this%3A%0A%7B%22col%22%3A%20%22Variable%22%2C%20%22op%22%3A%20%22IN%22%2C%20%22val%22%3A%20%5B%22speed%22%5D%7D%0A%60%60%60%0A%0AWhile%20this%20isn%27t%20the%20direct%20cause%20of%20the%20unhashable%20error%20%28that%27s%20the%20%60set%28%29%60%20bug%29%2C%20the%20%5BIN%20operator%20expects%20a%20list/tuple%20value%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/superset_typing.py%23L105-L106%29%20and%20may%20cause%20other%20issues.) [](https://go.dosu.dev/dis cord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/38718) GitHub link: https://github.com/apache/superset/discussions/38718#discussioncomment-16257731 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
