If you have no idea where in your code this error is being thrown, you can throw in some simple debug messages (not being able to see the code I have no idea how it's laid out)... if you put one every 1000 lines, you should easily be able to tell what chunk of code is causing the error, then narrow that down to 500, 200, 100, 50, etc. Then you'd have something you could post. Asking for help with code that you don't show is pointless.
In my opinion, simple print("debug 1"); print("debug 2"); etc. messages are highly underrated. When your script pukes, you can easily tell where, if it doesn't give you a meaningful error message.