FunctionWrappers.jl -> ERROR: LoadError: TypeError: in cfunction, expected Union{}, got a value of type Nothing

The more I investigated this error, the more confused I got. It’s to the point where I don’t even think I could give an accurate reproduction procedure.

All I know and all I want to share with people that search for this error message is that restarting Julia fixed the issue. This is the same solution that worked for a similar question.

Sorry, this is going to be very difficult if you cannot provide a reproducer.

I don’t need help. I only made this post to suggest to people facing similar issues to try restarting Julia.

If someone figures out what causes this (I suspect some Revise edge case, but I really shouldn’t speculate like that), then they should feel free to comment, but no need.