# Unable to run script in Canton ledger

**URL:** <https://forum.canton.network/t/unable-to-run-script-in-canton-ledger/2348>\
**Category:** App Development\
**Tags:** script, canton\
**Created:** [March 29, 2021, 9:24am UTC](https://forum.canton.network/t/unable-to-run-script-in-canton-ledger/2348 "2021-03-29T09:24:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre.filliolaud](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@pierre.filliolaud](https://forum.canton.network/u/pierre.filliolaud)\
**Post date:** [March 29, 2021, 9:24am UTC](https://forum.canton.network/t/unable-to-run-script-in-canton-ledger/2348/1 "2021-03-29T09:24:10Z")

</div>

Hi,

I am trying to run a Daml script in my canton ledger and I am getting this following error. The same script works fine with other kind of ledger. Any idea?

My script tries to create 2 parties and 2 smart contracts no more… 🙁

Regards,  
Pierre

```haskell
Error: User abort: Submit failed with code 3: Command interpretation error in LF-DAMLe: Interpretation error: Error: Update failed due to precondition violation when creating Roles.PlatformAdminRole:PlatformAdminRole@3348ea84 with Roles.PlatformAdminRole:PlatformAdminRole@3348ea84{ platformAdmin = 'PlatformAdmin2::122007f0881e740c775e911f01c510a43ebb74ac59a527e550e40cb941eff52912c9' }. Details: Last location: [unknown source], partial transaction: <empty transaction>.
Exception in thread "main" com.daml.lf.speedy.SError$DamlEUserError
	at com.daml.lf.speedy.SBuiltin$SBError$.executePure(SBuiltin.scala:1398)
	at com.daml.lf.speedy.SBuiltinPure.execute(SBuiltin.scala:55)
	at com.daml.lf.speedy.Speedy$Machine.enterApplication(Speedy.scala:445)
	at com.daml.lf.speedy.SExpr$SEAppAtomicGeneral.execute(SExpr.scala:140)
	at com.daml.lf.speedy.Speedy$Machine.run(Speedy.scala:328)
	at com.daml.lf.engine.script.Runner.stepToValue$1(Runner.scala:346)
	at com.daml.lf.engine.script.Runner.run$1(Runner.scala:368)
	at com.daml.lf.engine.script.Runner.$anonfun$runWithClients$17(Runner.scala:429)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)

```

---

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [March 29, 2021, 1:21pm UTC](https://forum.canton.network/t/unable-to-run-script-in-canton-ledger/2348/2 "2021-03-29T13:21:22Z")

</div>

Welcome to the forum @pierre.filliolaud, [preconditions often refer to some property that is being enforced using the `ensure` keyword](https://docs.daml.com/daml/reference/templates.html#preconditions). Do you have any `ensure` assertions that are not being met on the `Roles.PlatformAdminRole` template?

If that doesn’t resolve the issue please provide a code sample that demonstrates the issue and we can help further.
