tata
1
Hi
I’m trying to create a Q&a based on the /answers. After uploading the JSONL files (which I created from some pandas with string objects), one of them returns this error after processing:
“status_details”: “Invalid file format. Example 3 has a non-string text.”
Can anyone shed some insight on how to proceed?
Welcome to the OpenAI community @tata!!
That is interesting, I haven’t seen that error before. What is shown when you print out the object type of Example 3 with the type() function? You said they’re all strings, so I trust you. Copying and pasting text from online sources can sometimes be problematic as well.
Is it possible to provide us with the problematic example so we can help you look into this issue? Also, if I may ask, are you ensuring that you’ve encoded the strings in “UTF-8” format when you’re creating the JSONL file with the ‘encoding’ parameter?
sps
4
Hi @tata,
Welcome to the openAI community.
Sharing ‘example 3’ raw text by copying and pasting ‘example 3’ from your .JSONL file here might help in better understanding of the problem.
1 Like
fvrlak
5
If I remember correctly issue is because you have string inside string or some characters in text on 3rd line which are not supported.
{"prompt": "<prompt text>", "completion": "<ideal generated "someotherStringHere" text>"}
{"prompt": "<prompt text>", "completion": "<ideal generated 'someotherStringHere' text>"}
1 Like
tata
6
Hi @m-a.schenk ou can convert pandas to jsonl by using this command:
df.to_json(“xxx.jsonl”, orient=“records”, lines=True)
1 Like
tata
7
Thanks @fvrlak Actually the issue was not about the special characters. I found that there were some null cells in the data. dropped the nulls and the problem was solved.
tata
8
thanks @sps. The issue was about null rows. I dropped them and the problem was solved.
1 Like
tata
9
@DutytoDevelop
the issue was about nulls.
1 Like