It would be easy to see from the script, so if you could post that the answer can be found quickly.
But, guessing, from the error, I'd say the error is not in the electrodes but the scattering region element list, which somehow is either not a simple list, or it contains something which is not an element like Carbon, Gold, etc.