So it creates a csv of the entire table or possibly a record and then it tries to import it somewhere else.
Without seeing all of the code and the exact record you are having issues with it is hard to say. If it is erroring on just the one record then my guess would be there is a character in there that it was not ready to handle. Do you have any abnormal text characters in any of these records?
The way I would go about it is adding a console.log to the right place in that code and seeing the exact xml it is trying to import. That way you can get a look at what it is trying to import, it might help to debug it. You might also be able to see the XML inside of the Chrome developer console but I forget exactly how, possibly in the network tab. That would be the easier way.
If you are not comfortable with JavaScript you might need to contact the people who you got the script from. It is hard to debug without seeing all the code or the exact record it is failing on but if you do the stuff above it should give you a better idea I think.