# Exception : org.python.core.PyException: TypeError: unhashable type: 'dict'

**URL:** <https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [April 11, 2022, 1:20pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291 "2022-04-11T13:20:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 11, 2022, 1:20pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/1 "2022-04-11T13:20:29Z")

</div>

Sometime in perspective I have the following error:

```auto
org.python.core.PyException: TypeError: unhashable type: 'dict'

```

but I can’t figure out where it come from. Context in the logger is quite obscure…

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3d21e3b1644ec700bf142d966805e4788f38eb1a.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 11, 2022, 1:28pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/2 "2022-04-11T13:28:07Z")

</div>

Some project script is trying to use (assign) a dictionary as the _ **key** _ in another dictionary. Presumably at the top level, as this appears to be a traceback during script module reload.

---

<div class="post-metadata">

**Author:** ![alex.chmelka](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex.chmelka/32/26672_2.png) [@alex.chmelka](https://forum.inductiveautomation.com/u/alex.chmelka)\
**Post date:** [August 26, 2025, 9:43pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/3 "2025-08-26T21:43:05Z")

</div>

Did you ever find a solution to this? I get this issue in my project sometimes and its incredibly annoying as my scripting seemingly fail to compile without forcing constant saves. I have not been able to identify the issue. It’s clearly a dictionary attempting to define another dictionary as a key, but I can’t find anywhere where this is happening. Thanks.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 26, 2025, 10:05pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/4 "2025-08-26T22:05:08Z")

</div>

It is likely this:

> [@\[IGN-6503\]Project Library Script Initialization Races](https://forum.inductiveautomation.com/t/ign-6503-project-library-script-initialization-races/98636):
>
> Are you annoyed by pseudo-random breakage in Ignition project library scripting? Odd top-level constants being garbled, or operations in the top level that have side effects running twice? Or more? Not happening much, but always around project edits, and sometimes even on gateway restart? Yeah, me too. frowning_face Poking around under the hood back in the spring, for a module development task, I ran across some problematic IA bytecode and pinged some people. But it went nowhere, as I co…

Note that IA's attempt to fix this based on my recommended solution crashed and burned: AB-BA deadlock.

My followup recommendation involves jython's import lock, which would almost certain fix it, but would almost certainly come with serious performance regressions for those whose programming practices include abuse of the `import` statement. ☹

I don't know where this stands within IA.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 26, 2025, 10:30pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/5 "2025-08-26T22:30:34Z")

</div>

An alternate fix that use the common Jython import lock has already been in place in 8.3 for the entire public beta period. Nobody's complained yet 🤷

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 26, 2025, 11:24pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/6 "2025-08-26T23:24:08Z")

</div>

> [@paul-griffith](#):
>
> Nobody's complained _ **yet** _

Fingers crossed. It would be good to backport at some point.

---

<div class="post-metadata">

**Author:** ![alex.chmelka](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex.chmelka/32/26672_2.png) [@alex.chmelka](https://forum.inductiveautomation.com/u/alex.chmelka)\
**Post date:** [September 3, 2025, 8:04pm UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/7 "2025-09-03T20:04:41Z")

</div>

Thank you for the information. Will try @pturmel’s fixes as 8.3 is not in the cards for us right now until a stable release has been set.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 4, 2025, 1:06am UTC](https://forum.inductiveautomation.com/t/exception-org-python-core-pyexception-typeerror-unhashable-type-dict/58291/8 "2025-09-04T01:06:18Z")

</div>

Be aware that my fix is not--cannot be--complete. As noted in that topic.

It is also vulnerable to uncaught errors between acquire and release. Be paranoid with initialization error handling.
