# How to resolve "key not found" in Daml Script Export?

**URL:** <https://forum.canton.network/t/how-to-resolve-key-not-found-in-daml-script-export/3621>\
**Category:** App Development\
**Tags:** daml\
**Created:** [December 22, 2021, 4:05pm UTC](https://forum.canton.network/t/how-to-resolve-key-not-found-in-daml-script-export/3621 "2021-12-22T16:05:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [December 22, 2021, 4:05pm UTC](https://forum.canton.network/t/how-to-resolve-key-not-found-in-daml-script-export/3621/1 "2021-12-22T16:05:48Z")

</div>

How do I solve this problem?

```haskell
daml ledger export script --all-parties --output ../out --sdk-version 1.18.0
17:05:06.419 [script-export-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
java.util.NoSuchElementException: key not found: party-41a9b204

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [December 22, 2021, 4:07pm UTC](https://forum.canton.network/t/how-to-resolve-key-not-found-in-daml-script-export/3621/2 "2021-12-22T16:07:33Z")

</div>

Sounds like a bug, can you share steps to reproduce this or is there more output in the error, e.g., a stacktrace? Not quite sure where it’s falling over.

---

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [December 22, 2021, 4:10pm UTC](https://forum.canton.network/t/how-to-resolve-key-not-found-in-daml-script-export/3621/3 "2021-12-22T16:10:31Z")

</div>

How do I get a stacktrace?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [December 22, 2021, 4:12pm UTC](https://forum.canton.network/t/how-to-resolve-key-not-found-in-daml-script-export/3621/4 "2021-12-22T16:12:01Z")

</div>

I thought there might be some in the CLI output by default below the lines you showed here. If there isn’t, then I don’t know of an easy way to get one without code changes
