Had the same issue last week! Turns out, json.dumps() hates NaN and Infinity values—throws a ValueError.
If your data has those, either clean it first or use a lib like `simplejson` which handles them gracefully.
Also, watch out for circular references. They’ll crash your script real quick.
If your data has those, either clean it first or use a lib like `simplejson` which handles them gracefully.
Also, watch out for circular references. They’ll crash your script real quick.
