Error with JSONL loader in Custom Recipe

I am trying to create a custom recipe that allows for me to choose between multiple text option to describe an image, currently have it set up for text though. However, when I try to run it, I get the error, “return ujson.loads(data) ValueError: Expected object or value.” It also says that my JSONL is invalid, but I ran it through an online validator which said it was valid.

image

Your code looks correct and from looking at your screenshot, I also don’t see anything wrong with the data. But JSON validation errors usually mean that there’s something that trips up json.loads. This can be actual invalid JSON, trailing data etc. What happens if you run the following? Does it print anything?

from pathlib import Path
import json

with Path("graphs.jsonl").open("r") as f:
    for line in f:
        try:
            json.loads(f)
        except:
            print("Problem:", line)