Skip to content

"Out of range float values are not JSON compliant" #30

@FranciscoLozCoding

Description

@FranciscoLozCoding

Description

v022 is encountering a failure in weavloader during the collection.data.insert(...) call to Weaviate.
The full code path is here: weavloader/processing.py#L254

The exception being raised is:

Exception: Error processing URL https://storage.sagecontinuum.org/api/v1/data/imagesampler-left-1274/sage-imagesampler-left-0.3.5/00004cd98fb56d33/1760990405740993371-sample.jpg: Out of range float values are not JSON compliant

This error originates inside httpx when serializing the JSON payload for Weaviate.
It generally indicates that some value in the request body contains a non-finite float (NaN, inf, or -inf).

Initially, I suspected the issue was coming from the GPS metadata or the embedding vectors, so I added explicit finite-value checks (np.isfinite). However, even after sanitizing coordinates and embeddings, the error persists. I also sanitize text fields, but the error persists. This suggests that non-finite values may still be appearing in metadata fields or possibly inside nested structures such as the base64 image field or the GeoCoordinate wrapper.

At this point, the specific offending field is still unknown — Weaviate rejects the payload before providing details.


What I’ve done so far

Despite this, the insert still fails with the same JSON serialization error.


Next Steps / Needed Investigation

  • Identify which field inside properties or vector still contains a non-finite float or an unserializable value.
  • Add or recommend a more systematic diagnostic step (e.g., scanning every field in data_properties for non-finite numbers before insert).
  • Investigate whether httpx or the Weaviate client performs additional type coercion that might reintroduce NaN/Inf from NumPy or pandas.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions