Beeminder Forum

Trouble updating goal with roadall

I’m working on a script to add breaks to goals, but I’m getting an error back from the API testing with one of my goals:

422: Error parsing params (roadall)

I’ve printed the roadall my script is generating, and it looks reasonable to me the best I can tell:

[[1576083600, 0, None], [1576947600, None, 1], [1577206800, None, 0], [1907341200, None, 1]]

Can anyone help me figure out what I’m doing wrong?

1 Like

Good question! I think it needs to be null not None

Hmm, but None is the keyword for null in Python… So I don’t think that’s wrong… Unless the API wants the literal string “null”?

The key here will be establishing how your object is getting serialized over the network. If it’s getting turned into the characters “None”, I don’t think that’s going to work.

The API accepts data in JSON format, not Python.

Right, I’m aware. I was printing the data before it was serialized in my API wrapper.

Anyway, thanks for the tips! I’ll take a closer look at the serialization step once I get back to a computer.

Oh, I see, apologies, I misunderstood. In that case I agree with @adamwolf.

1 Like