# Common Error Messages

# misplaced assignment statement

Equations in MTK use the ~ operator to indicate equality and not the = operator. If you accidentally use = in your equations, you will get the misplaced assignment statement error.

# missing from the variable map.

An example of this would be:

ERROR: ArgumentError: SymbolicUtils.BasicSymbolic{Real}[v(t)] are missing from the variable map.

In this case "the variable map" is referring to the mapping of variables to their initial conditions which means this error message is telling you that v requires an initial condition in the call to ODEProblem (e.g., add v => 0.0 to the set of initial conditions being passed into ODEProblem).

# ERROR: TypeError: non-boolean (Num) used in boolean context

If you see this error, one possibility is that you are using the Julia ternary operator (cond ? v1 : v2) or the Julia functional if...else construct. If so, these should be refactored to use the Julia Base.ifelse function as discussed here.

# Plots missing

If you run a plot(...) command and you don't see the plot. Try wrapping plot(...) with the display function, e.g., display(plot(...)). Furthermore, when you invoke julia, add the -i flag.

# GKSGKS: Open failed in routine OPEN_WS

If you get this error, you might wish to consult this thread.