This is an error occurring when the preview is being generated.
What Product are you using when this error occurs?
My Guess is that you are using either DataAssist or Security Assist and selecting to use a template that has a spry scripting error in it.
can you send a copy of the template so I can examine the code?