Error: "The script syntax is invalid"

Symptom

Script validation fails with the error: The script syntax is invalid

Cause

During the validation process, a syntax error was detected in the script Python code.

Action
  1. Modify the script to correct the syntax errors.
  2. Replace the script on the switch with the modified script.