I have a script which generates some data, and at the end of the execution, the data is saved using save command. The script runs smoothly and the data is generated. However when it comes to saving the data, I get the above mentioned error. I have no clue what's happening. Any help would be appreciated.
Update: I ran the same script on my laptop and it works as intended. However if I try to run it on a server I get the same error, even after changing the name of the file I want to save data to. However if I try to append that data to another file, I don't see any errors.