'Exception in thread "main"' error when running 'daml start'

I’m running the command daml start on my project and I get the error below. Based on the line 'Expected type ‘Daml.Script.Script’ I guess that it’s complaining about the import Daml.Script line that I have in my test file ‘Chore_Test.daml’,:

module Chore_Test where

import Main
import Daml.Script

Error

Exception in thread “main” java.lang.IllegalArgumentException: Expected type ‘Daml.Script.Script a’ but got TApp(TApp(TBuiltin(BTArrow),TBuiltin(BTParty)),TApp(TApp(TBuiltin(BTArrow),TBuiltin(BTText)),TApp(TTyCon(814b6477c1505f3cdcb28e7c33161de3373f11da1a2ba705689558484e0c951b:Daml.Script:Script),TApp(TBuiltin(BTContractId),TTyCon(2a34ae92bb98ef0a10992f45077fe6d53bff4348b27af4406e9ef6a87ec505bd:Main:Child)))))

Any help trying to debug is appreciated.

1 Like

The issue is around your init-script. It needs to point to something of type Script a for some type a but it looks like it points to something of type Party -> Text -> Script (ContractId Child). Either fix your code to not have arguments or drop the init-script line from your daml.yaml.

1 Like