The answer is:
predict() for whatever reason gives an error if the name of the variable for vm() has an underscore in it.
Example: "line_code" = error, "linecode" = should work. At least that is how I debugged my issue.