Cloze collection import not working for Cantonese

Hello!

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.

@ataraxic
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.

@mike
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_us @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.

2 Likes

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

2 Likes

Hello Clozemaster team, could you please check for Thai if there is any such issues? I get the exact same error message.

"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".

I am positive, that I am not doing anything wrong, as I am uploading for Mandarin and Korean too in CSV UTF-8 format without any issues. I also tried to upload only one sentence in the document which was super short and clearly without empty strings etc…

Thank you so much in advance :blush:

Sel

1 Like

Hi Sel, thanks for letting us know and sorry for the trouble! If you’re comfortable with it and to be sure, might you be able to send the file to support@clozemaster.com? From there we can reproduce and fix the issue more easily.

1 Like

Hi Mike, thank you so much for your quick reply. And no worries :blush: I just sent the file.