I'm trying to compile a script locally, it doesn't throw any errors in the online SmartPy terminal, but when I try to compile locally with add_compilation_target and SmartPy CLI I get:

"Error in generated Michelson contract"

Compilation Target

ADMIN_ADDRESS = 'tz1VSUxxxxxCjcjb' // A full local testnet addresss

sp.add_compilation_target("playlist_compiled", PlaylistContract(sp.address(ADMIN_ADDRESS)))

Compile Command

./SmartPy.sh compile ./contracts/playlist_contract.py ./compilation

I'm curious how I might go about debugging an error like that, does anyone have any ideas?

1 Answer 1


You should look at the generated contract.tz file code. It’s most likely an unknown type somewhere.

  • Ah to the contract has still been generated? I'll check it out thank you! Dec 24, 2021 at 14:17
  • 1
    Yes, when the smart contract cannot be generated, the error is (supposed to be) clear. Here, it’s likely that you simply need to add some information or fix simple things but it’s not attributable to a precise line of code in your script. The error could be clearer obviously but there is some kind of global property that is missing.
    – FFF
    Dec 24, 2021 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.