Hi ,
Found the issue and corrected it.
I was using read function to read a file but since the file was too long it was throwing this error
with open(filename,'r+') as pre_file:
raw_data=pre_file.read()
pre_file.close()
It was resolved when I used readlines function instead -
with open(filename,'r+') as pre_file:
raw_data=pre_file.readlines()
pre_file.close()
Thanks for your time anyways,
Regards.