Please help me solve this GENERATEJS_TASK task error

Please help me solve this GENERATEJS_TASK task error

I am trying to fetch a record and update a stateless form with the results. I have been getting a cascade of errors; Error in executing On Add-On Load script; Error; Error in executing IF rule: Error in executing If block; Error in executing For Each Record task; and finally Error in executing GENERATEJS_TASK task.

The section of the script that is causing the error looks like this;
if (input.Email1  !=  null)
{
    for each myPhys in X_Physical_Profile [Email1 == "xyz@gmail.com"] //hardcoded the email variable to help solve this
    {
        input.Email1 = myPhys.Email1;
        input.Kit_ID = myPhys.Kit_ID;
        input.Goal1 = myPhys.Goal1;
        input.Activity_Level = myPhys.Activity_Level1;
        input.Snacks = myPhys.Snacks;
        input.Race = myPhys.Race;
        input.Sex = myPhys.Sex;
        input.Age = myPhys.Age;
        input.Weight = myPhys.Weight;
        input.Height_inches = myPhys.Height_inches;
        input.BMI = myPhys.BMI;
        input.BMR = myPhys.BMR;
        input.Est_k_Cal_day = myPhys.Est_k_Cal_day;
    }
}

If I comment out the line that says input.Activity_Level = myPhys.Activity_Level1 the script goes beyond the error documented above and fails later because data needed for additional scripting is no longer present. So I suspect the problem has to do with the input.Activity_Level line. What I can't seem to figure out is why this line is causing a problem as there are other radio button fields involved in the script shown above and they cause no problems. The application has been shared with support. The stateless form that is having the problem is called Physical_Profile_SL.

As always, thanks in advance for your help.

John