I realize this is probably better raised in the motoko repo but I encountered it at embed.smartcontracts.org so I figured I’d start here.
I was trying to help someone translate some Motoko code to Candid so they could call a method using dfx, and ran into mo:12.1-12.20: internal error, Invalid_argument("to do: ToCandidE")
It originates here: https://github.com/dfinity/motoko/blob/26c229ad2b6305e15740eb718aa1caf1329f9afd/src/mo_interpreter/interpret.ml#L439-L440
| ToCandidE _ -> invalid_arg "to do: ToCandidE"
| FromCandidE _ -> invalid_arg "to do: FromCandidE"