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.

3 Likes

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

1 Like

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.

1 Like

LOL! I had the issue again, so I copy pasted the error message into Google search and lo and behold, it brought me back to this post I had completely forgotten about.

The best part is that the solution was indeed to restart Julia! Sorry to necro the thread, but this was too funny not to share.