Cloze collection import not working for Cantonese


I don’t know how long it’s been like this but I tried to import sentences and I’m getting the error below. It’s the same whether I try to import a file or paste in some sentences.

Oh no! There was an error processing the text: An empty string is not a valid JSON string. - sorry about that. Please try again and let us know if you see this message again.

Are you sure you’re not pasting in an empty string, as the message says? Could you give an example of a sentence/translation pair that’s not working for you? It would help if you surround it by, say, quotation marks.

Yes, I’ve checked for empty strings. I’ve tried entering a single sentence into the text importer and it’s the same error.

Hello @ataraxic
I successfully imported the following data (sentence = Cantonese; translation = Japanese; collection on Japanese course for English speakers).

However, if I save the file as a simple CSV file on my Microsoft Excel, Clozemaster returns the error:
Oh no! There was an error processing the text - sorry about that. Please try again and let us know if you see this message again.

So, I converted the file into a CSV UTF-8 format. The error was solved.

In your error message case, “not a valid JSON string” suggests that your CSV file was not properly converted into another text format called “JavaScript Object Notation”. The JSON function is activated when a system tries to convert a CSV format into another text format.

Non-Latin characters like in Chinese or Japanese often cause encoding errors. Maybe your sentences in Cantonese contain some problematic character codes.

Or, the “Cloze” column on your file is empty and Clozemaster couldn’t randomly pick up cloze-words. As Chinese and Japanese don’t split each word by space, the system may not process the auto cloze selection.

1 Like

I appreciate the help! Unfortunately, the importer is broken for Cantonese. I have successfully loaded collections many times in the past. I also tried the Mandarin importer which worked fine.

I tried to upload the same CSV UTF-8 file to the Cantonese course as well. But I got the same “not a valid JSON string” error.
So, it’s definitely related to the locale setting only for Cantonese.

Here is my wild guess. The importer automatically adds audio when a file is uploaded or manually pasted. The Mandarin and Japanese courses can read Chinese characters to generate audio files, but the Cantonese course failed. So, the system returns the JSON string error.

1 Like

@alanf @MsFixer thanks for the debug help! @ataraxic sorry for the trouble! The way that the sentences were being split into words for Cantonese needed a fix - it should be working now. Please let me know of course if you’re still seeing any error messages or anything’s not working as expected.


Thanks Mike! I can confirm the imports are working again.