Skip to content

InvalidJSONError: Out of range float values are not JSON compliant in _track_statuses #983

Todo

Description

@Pratichhya

Might be relevant to changes done for dynamic usage columns in #947

When running MultiBackendJobManager with a STACAPIJobDatabase, the run fails while persisting the active jobs:


... in _track_statuses
    job_db.persist(active)
  File ".../openeo/extra/job_management/stac_job_db.py", line 220, in persist
    self._upload_items_bulk(self.collection_id, all_items)
  File ".../openeo/extra/job_management/stac_job_db.py", line 257, in _upload_items_bulk
    self._ingest_bulk(chunk)
  File ".../openeo/extra/job_management/stac_job_db.py", line 236, in _ingest_bulk
    response = requests.post(url=self.join_url(url_path), auth=self._auth, json=data)
  ...
  File ".../requests/models.py", line 594, in prepare_body
    raise InvalidJSONError(ve, request=self)
requests.exceptions.InvalidJSONError: Out of range float values are not JSON compliant

Once it happens, the workflow fails for the rest of the jobs as well.

I was using openeo 0.53.0 version in the OTC backend.

I think the issue arises from

def _track_statuses(self, job_db: JobDatabaseInterface, stats: Optional[dict] = None) -> Tuple[List, List, List]:
when a job finishes, the job manager adds new usage columns to the table. Jobs that were already in the table get an empty value for those columns, but new jobs are added later without them. When the table is rebuilt, the missing values turn into NaN. STACAPIJobDatabase.persist() then tries to send these NaN values as JSON and it fails to even restart any other job.

As a workaround, I convert the NaN values to None manually in persist().

Activity

  1. Pratichhya commented on Nov 27, 2026

    @Pratichhya
    MemberAuthor

    @VictorVerhaert @VincentVerelst @HansVRP not sure who among you can help me confirm this issue so tagged you all, please feel free to untag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions