# Dazl Library - Da-Marketplace Integration - unhashable type: 'dict'

**URL:** <https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438>\
**Category:** App Development\
**Tags:** features and bugs\
**Created:** [November 12, 2021, 11:05am UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438 "2021-11-12T11:05:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Almeida](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/luis_almeida/32/2440_2.png) [@Luis\_Almeida](https://forum.canton.network/u/Luis_Almeida)\
**Post date:** [November 12, 2021, 11:05am UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438/1 "2021-11-12T11:05:28Z")

</div>

I wrote a python integration to obtain data from an external API with DA Marketplace using the Dazl library and I’m getting the following error log:

```haskell
Traceback (most recent call last):
  File ".../bot.py", line 41, in <module>
    asyncio.run(main())
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File ".../bot.py", line 23, in main
    async for event in stream.events():
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/aio/ __init__.py", line 134, in events
    async for item in self.items():
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/grpc/conn_aio.py", line 692, in items
    async for event in self._acs_events(tx_filter_pb):
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/grpc/conn_aio.py", line 740, in _acs_events
    c_evt = await self.conn.codec.decode_created_event(event)
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/grpc/codec_aio.py", line 242, in decode_created_event
    cdata = await self.decode_value(con(cid.value_type), event.create_arguments)
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/grpc/codec_aio.py", line 338, in decode_value
    return await self._loader.do_with_retry(
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/aio/pkgloader.py", line 76, in do_with_retry
    return fn()
  File "/usr/local/lib/python3.9/site-packages/dazl/ledger/grpc/codec_aio.py", line 339, in <lambda>
    lambda: self._decode_context.convert(item_type, obj)
  File "/usr/local/lib/python3.9/site-packages/dazl/values/context.py", line 72, in convert
    return self.mapper.data_record(self, dt, dt.record, obj)
  File "/usr/local/lib/python3.9/site-packages/dazl/values/protobuf.py", line 52, in data_record
    value = context.append_path(name).convert(fld_metadata.type, fld_data.value)
  File "/usr/local/lib/python3.9/site-packages/dazl/values/context.py", line 105, in convert
    return self.mapper.prim_gen_map(
  File "/usr/local/lib/python3.9/site-packages/dazl/values/protobuf.py", line 132, in prim_gen_map
    obj[key] = value
TypeError: unhashable type: 'dict'

```

After some investigation, I came across the reason for the error shown, it being a dictionary with the structure of a Claim from the ContigentClaims Library, like so:

```haskell
{'Zero': {}}

```

This error seems to be coming from the Dazl library, can you help me with this issue?

---

<div class="post-metadata">

**Author:** ![dtanabe](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/dtanabe/32/91_2.png) [@dtanabe](https://forum.canton.network/u/dtanabe)\
**Post date:** [November 12, 2021, 2:10pm UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438/2 "2021-11-12T14:10:49Z")

</div>

Thanks for reporting; at first blush I agree; looks like a serialization bug in dazl. Will look into it.

---

<div class="post-metadata">

**Author:** ![alex.graham](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/alex.graham/32/830_2.png) [@alex.graham](https://forum.canton.network/u/alex.graham)\
**Post date:** [November 12, 2021, 3:13pm UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438/3 "2021-11-12T15:13:06Z")

</div>

Hey @Luis_Almeida, can you let us know which version of dazl you are using?

---

<div class="post-metadata">

**Author:** ![Luis\_Almeida](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/luis_almeida/32/2440_2.png) [@Luis\_Almeida](https://forum.canton.network/u/Luis_Almeida)\
**Post date:** [November 12, 2021, 3:33pm UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438/4 "2021-11-12T15:33:01Z")

</div>

Hi, I’m using version 7.5.9. I’ll try it out with the latest version and get back to you.

---

<div class="post-metadata">

**Author:** ![Luis\_Almeida](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/luis_almeida/32/2440_2.png) [@Luis\_Almeida](https://forum.canton.network/u/Luis_Almeida)\
**Post date:** [November 12, 2021, 4:08pm UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438/5 "2021-11-12T16:08:18Z")

</div>

Many thanks, that seems to have fixed it. Thank you for your time.

---

<div class="post-metadata">

**Author:** ![alex.graham](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/alex.graham/32/830_2.png) [@alex.graham](https://forum.canton.network/u/alex.graham)\
**Post date:** [November 12, 2021, 9:58pm UTC](https://forum.canton.network/t/dazl-library-da-marketplace-integration-unhashable-type-dict/3438/6 "2021-11-12T21:58:24Z")

</div>

Great, I’m glad to hear it!
