"NameError: global name 'seasonid' is not defined" when selecting web links

web links cause this error: "NameError: global name 'seasonid' is not defined"
added 
        seasonid        = getElementText(episode, 'seasonid')