OK, so here is my workaround. Luckily each "Writing note" output line includes the title of the note, so I went back to Synology Note Station to find the offending note. It was not important, so I moved it to a new notebook called "Transfer Errors". Then I exported from Synology Note Station again but I excluded the "Transfer Errors" notebook.

I had to do this for 3 or 4 notes in the end, but now I'm done.