Its impossible to diagnose the error with so little information. Show your script, define or upload a sample of your data and describe the error in detail including all the remedies you have already tried.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein