My guess is that you have something wrong elsewhere in your logon script.

Just don't see how you could get that error.