I get this error when deploying to DAML Hub while using daml-finance, other daml-finance modules are completely fine without having to do anything extra. Unpacking the dar that I’ve uploaded to DAML Hub shows that the DALF file for the missing module is there.
Exception in thread "main" com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: key not found: 4b5bf7a6465e5e11800a03c131a5759565edd3ff9cfc43f41d1f7fbc72255587:Daml.Finance.Interface.Settlement.Instruction:Instruction
Hi @dylan_obsidian ,
Is this a custom script you’ve written or one found with the
daml-finance or reference app?
Can you confirm that the script runs correctly against a locally running ledger?
Hi @alex.graham, This is a custom script I’ve written. The script works fine when I run
daml script against a local running ledger (via
Interesting. Do you mind sharing the script, or at least the section of the script where you believe the error is occurring? If you don’t feel comfortable sharing code, can you let us know which
daml-finance templates and interfaces you’re using, and what choice/how you’re exercising it to help you debug this?
The relevant code is
instructionViews <- forA instructionCids $ \icid -> do
iv <- submit borrower_alice $ exerciseCmd icid Instruction.GetView with viewer = user
pure (icid, iv)
This is surrounded by
debug and this is the exact spot where where it fails
There seems to be an incompatibility with interfaces and the JSON API that we’re looking into.
In the meantime, you can run
daml script through the GRPC API instead by:
- Removing the
https:// in the
"host" fields of the
--json-api and adding
--tls to the
daml script command
Let me know if that doesn’t work.